on 06-26-2008 11:14 AM
Hi,
What's the most efficient method: SAX, DOM or JAXB?
Hi Indrajit,
I guess u r talkin abt java mapping
It basically boils down to the kind of requirement u have ...
A DOM(Document object model) is a collection of nodes, or pieces of information,organized in a hierarchy. This hierarchy allows a developer to navigate around the tree looking for specific information.
Analyzing the structure normally requires the
entire document to be loaded and the hierarchy to be built before any work is done, the DOM is said to be tree-based,or object-based.
u can use SAX parser for large documents (as parsing and loading the entire document can be slow and resource-intensive).
Hence u have an event-based models, such as the Simple API for XML (SAX), work on a stream of data, processing it as it traverses.
Hope it helps
Regards,
Mohd Tauseef I
Edited by: Mohd Tauseef Ibrahim on Jun 26, 2008 12:27 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
PLease refer http://www.codeproject.com/KB/XML/java_xml-binding_objects.aspx
Regards
Aashish Sinha
PS : reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DOM is generally most efficient for small messages, while SAX is more efficient for very large messages. The efficiency depends on size and structure of message to be processed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
SAX parser is easy compare to DOM. Its is an easy api and SAX parse if fast in acessing elements. If you want to go back to xml elements move freely top and bottem of xml elements better go for DOM.
Thanks,
RamuV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.