wood burning stoves 2.0*
The moose likes Java in General and the fly likes I want to use java properties into loading an xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "I want to use java properties into loading an xml" Watch "I want to use java properties into loading an xml" New topic
Author

I want to use java properties into loading an xml

bob morkos
Ranch Hand

Joined: Sep 06, 2001
Posts: 104
I have variables within my xml and I need to extract those variables into my java program. Could anyone explain. Any help would be greatly appreciated.
Manoj Pooleery
Ranch Hand

Joined: Sep 20, 2000
Posts: 35
First, if you are using the XML file as a descriptor(properties file) of some sort, you will have to parse it using any of the parsers available, which will return you a tree, from which you can extract the property value using Node.getAttribute or any similar method.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: I want to use java properties into loading an xml