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 Digester and
as an add-on allows you to write Java beans to an XML file.
Both are fairly easy to use and if your application is Struts based you
should already have Digester included.
Tutorials and docs can be found on the Jakarta Commons site.
Martin
vikas rao schrieb:
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:
<com>
<MyCompany>
<Common
inputDir="C:/vray/xml_files/"
outputDir="C:/xm_output"
/>
</MyCompany>
</com>
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 some
sensible help.
Any help will be appreciated.
Thanks.
Vikas.
--
----------------------------------------------
Martin Kindler
Kaulbachstr. 20a
D-12247 Berlin
Deutschland
E-Mail: [EMAIL PROTECTED]
Tel. +49 (030) 260 78 48 1
Fax +49 (030) 260 78 48 3
GSM +49 (0160) 977 636 14
Skype martin.kindler
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]