Reading XML content and storing in variable
Hi,
I am using SAX parser to parse the xml file.
I am trying to store the tag value in some variable so that I can use that variable across the project and in future if any changes need to be done then I will just have to change the xml file.
I try to search on net but that dont store value in some variable.
Any Help will be appreciated.
Thanks!!!!!!!!!!
Re: Reading XML content and storing in variable
Hi - You need to use the Java to XML binding API - JAXB - Or you can use open source API like Castor.
JAXB maps the XML elements to java objects so that they can be accessed in your java code.
This is the standard way for mapping XML data into Java.
I hope this answers your question.