Question 4.
Why are some developers using SAX instead of DOM for document processing?
According to Ince (2004), SAX or Simple API for XML is a simple way to program an XML application because it is based on events occurring when some element in an XML defined document is encountered. SAX has much smaller memory demands than the Document Object Model or DOM because the DOM has to load the whole document into memory whereas SAX just works on the current node. Also the DOM is more difficult to program as the programmer has to traverse a tree and it's nodes and uses recursion which some programmers find difficult to understand.
References
Ince, D (2004). Developing Distributed and E -Commerce Applications (2nd ed.). Essex: Pearson Education Limited.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment