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 is the difference between the font and fontmetrics classes?
Can I run seam outside of jboss as?
Do we need to override service() method
What is the argument type of a programs main() method?
How task's priority is used in scheduling?
Which characters may be used as the second character of an identifier, but not as the first character of an identifier?
What is the purpose of the wait() method?
Why use a datasource when you can directly specify a connection details?
Explain RMI Architecture?
how to use debug in my elipse to solve problems that exist in my project
What is a session? Can you share a session object between different theads?
What is the purpose of the notifyall() method?
How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!
Why are component architectures useful?
What is permgen or permanent generation?