Why DOM Parser would take more Memory than SAX parser
while they are parsing?
Answer Posted / sandya
Both SAX and DOM are used to parse the XML document. Both
has advantages and disadvantages and can be used in our
programming depending on the situation
SAX:
1. Parses node by node
2. Doesnt store the XML in memory
3. We cant insert or delete a node
4. Top to bottom traversing
DOM
1. Stores the entire XML document into memory before processing
2. Occupies more memory
3. We can insert or delete nodes
4. Traverse in any direction.
If we need to find a node and doesnt need to insert or
delete we can go with SAX itself otherwise DOM provided we
have more memory.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
What do you know about seam?
Is infobus easy to use?
Describe, in general, how java's garbage collector works?
What is in-memory replication?
Why is actionform a base class rather than an interface?
What is TL and its use?
What is glasgow?
Are we allowed to change the transaction isolation property in middle of a transaction?
wahts is mean by dynavalidatorform in struts/
What is the purpose of the wait(), notify(), and notifyall() methods?
What is the difference between RMI and Corba?
What value does readline() return when it has reached the end of a file?
What are the benefits of detached objects?
What are the purpose of introspection?
Name the eight primitive java types.