I want read this file, there can be N numbers of <button>tag
I have some knowledge of SAX and DOM parser....but I'm not able to choose which is better one...
There is also new parser as JDOM....
now I have 3 options as SAX,DOM, JDOM
please help me to choose better parser for my application
there are even more options like JAXB or StAX to process XML documents in Java
Which parser to choose really depends on which task to solve! It may be for example a trade-off between memory consumption or performance. This may depend on your requirements, the size of XML documents etc. Without knowing more about these things it's difficult to choose the "right" API. Perhaps you can elaborate a little bit more on this!
posted 9 years ago
The contents of the file are mentioned above.... file is not going to be a large one....
At least this doesn't limit you to "memory efficient" APIs. Nevertheless the appropriate API in your case depends on what you're trying to achieve.
Basically there are two different things the APIs do when reading XML documents: One class of APIs transforms you XML document into an in-memory object representation (DOM, JAXB). The other generate some kind of "events" for nodes and attributes in the XML document which let's you invoke some action for each event.
There is surely a lot more to all the major XML APIs but perhaps this helps you to make a decision. If you have more question, just feel free to ask ;-)