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
difference between ejb,struts,hibernate,spring and jsp
Explain what is orm?
A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions
What happens when a thread cannot acquire a lock on an object?
Difference between DurableSubscription and non- DurableSubscription?
How database connectivity in XML is achieved?
Explain ioc concept?
Is the session factory thread safe?
Name the eight primitive java types.
Explain the different types of memory used by jvm?
What are the types of scaling?
What are transaction attributes?
What are the different types of exception?
Can I map more than one table in a cmp?
What is prototype?