Does anyone know how I can parse an XML document and map the nodes and their values to java classes...I am not talking about JAXB because that maps to multiple classes and at design time from a schema........what I want to know is how to represent xml content in some form of java object/bean.......someone must have been thru this either using SAX or DOM parser...
any code samples or examples would be greatly appreciated...
many thanks in advance.......
JDOM is best for XML parsing.
While doing a program on parsing. I have to refer to the DOMParser. It is imported and it is in the environment, But still it says that DOMParser NoClassDefFoundError I used javax.xml.parsers.* to get out of using DOMParsing.
What is the actual problem org.apache.xerces jar file.
Castor is a free framework for XML to Java and Java to XML conversions (and offers a lot of other features as well).
I have used SAX, DOM, JAXB parsers and have wasted significant time writing codes. But with Castor its extremely easy, when coupled with ANT builds it saves a lot of time .
You may find Castor at www.castor.org
Hope this helps, any questions do post them.