Re: OT- need some help

2007-05-21 Thread vikas rao
Hi martin, Yes, Now that I look at Digester's faq, seems like this can be pretty useful.Once the info in the files are available through java beans, i can use them anywhere I want using the getter methods. However, in my current scenario, looks like a simple key value pair, ie having a .properties

Re: OT- need some help

2007-05-21 Thread MK Tan
On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: Can you give me an example? The reason I chose to do it this way is basically I can change the inputDirectory, outputdirectory and other values without making any changes in the code, hence using it anywhere becomes easy. In our company, we

Re: OT- need some help

2007-05-21 Thread Martin Kindler
vikas rao schrieb: No, Martin, I wasnt looking at plain xml reading ,in that case i could just use a normal parser and get the values right? Thanks, Vikas. Yes, sure, you could just use an XML parser and do your own stuff. The problem with this approach would be that changing your XML structur

Re: OT- need some help

2007-05-21 Thread vikas rao
No, Martin, I wasnt looking at plain xml reading ,in that case i could just use a normal parser and get the values right? Thanks, Vikas. On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: Hi, Can someone point out a tutorial or some place where I can learn how to read values from a .cfg file?

Re: OT- need some help

2007-05-21 Thread vikas rao
Can you give me an example? The reason I chose to do it this way is basically I can change the inputDirectory, outputdirectory and other values without making any changes in the code, hence using it anywhere becomes easy. In our company, we have a jar file which is included in the build path and t

Re: OT- need some help

2007-05-21 Thread MK Tan
Hi, Just wonder why you need to do this in xml way? Wasn't it much simpler if you do it in properties (key value) format? Most of the time, I just found it people like to overuse xml :-p Best regards, MK Tan On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: Hi, Can someone point out a tutoria

Re: OT- need some help

2007-05-21 Thread Martin Kindler
Seems like you are looking for some type of XML reading. I would propose to look at Digester (which stems from the Struts project originally) (http://jakarta.apache.org/commons/digester/) or Betwixt (also from Apache Jakarta Commons http://jakarta.apache.org/commons/betwixt/) which builds on Di

OT- need some help

2007-05-21 Thread vikas rao
Hi, Can someone point out a tutorial or some place where I can learn how to read values from a .cfg file? Say I have a Input.cfg file which goes like: Now, if I need the inputDir value inside my program, how do I do it? Sorry that this is off topic from struts, but i cant seem to find so