== Application with config file in XML format, please help! ==
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   joey_corleon
Posted On:   Wednesday, March 12, 2003 04:27 AM

Good afternoon I am building a little application in which I would like to read a configuration file in XML format (not simple text format for a change :o). I clearly understand the XML format, but I still have problems to implement such a configuration file parser (that would extract all the values, parameters ...). On google I have found a few sample codes that read XML files and display them, well presented, to the screen. What I want to do is slightly different, it is: a) Reading the file and assign the different usefull parameters (skipping comments, unusefull spaces .etc...) to JAVA types (pretty much the same way as I would do with a simple text config file). b) Eventually modify the X   More>>

Good afternoon


I am building a little application in which I would like to read a configuration file in XML format (not simple text format for a change :o).

I clearly understand the XML format, but I still have problems to implement such a configuration file parser (that would extract all the values, parameters ...).


On google I have found a few sample codes that read XML files and display them, well presented, to the screen.
What I want to do is slightly different, it is:
a) Reading the file and assign the different usefull parameters (skipping comments, unusefull spaces .etc...) to JAVA types (pretty much the same way as I would do with a simple text config file).
b) Eventually modify the XML config file (change the value of a parameter) from my application.


A sample code would be just excellent to get me started.


Many thanks to all.

Joey.

   <<Less

Re: == Application with config file in XML format, please help! ==

Posted By:   Roseanne_Zhang  
Posted On:   Wednesday, March 12, 2003 05:23 AM

Using JDOM will make your job pretty easy. You only need to design your configuration interfaces (accessing methods, their parameters, return values) with your boss and other developers, then use JDOM to implement them. You DEFINITELY don't need to write a parser!!!
About | Sitemap | Contact