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 are the purpose of introspection?
If your ui seems to freeze periodically, what might be a likely reason?
What is the relationship between an event-listener interface and an event-adapter class?
what is a portable component?
Name the eight primitive java types.
Which are the different segments of memory?
What are the difference between RMI and CORBA?
Which class is the immediate superclass of the menucomponent class?
What is ioc concept & explain it?
what are getters and setters in Java with examples?
Are there books about seam?
How can I scroll through list of pages like the search results in google?
Why use POJO when I can use hashmap
Describe responsibilities of Activator?
How to determine SGA site?