What are the standard ways of parsing XML document?
XML parser sits in between the XML document and the application who
wants to use the XML document. Parser exposes set of well defined
interfaces which can be used by the application for adding, modifying
and deleting the XML document contents. Now whatever interfaces XML
parser exposes should be standard or else that would lead to different
vendors preparing there own custom way of interacting with XML
document.
There are two standard specifications which are very common and should
be followed by a XML parser:-
DOM: - Document Object Model.
DOM is a W3C recommended way for treating XML documents. In DOM we load
entire XML document into memory and allows us to manipulate the
structure and data of XML document.
SAX: - Simple API for XML.
SAX is event driven way for processing XML documents. In DOM we load
the whole XML document in to memory and then application manipulates
the XML document. But this is not always the best way to process large
XML documents which have huge data elements. For instance you only want
one element from the whole XML document or you only want to see if the
XML is proper which means loading the whole XML in memory will be quiet
resource intensive. SAX parsers parse the XML document sequentially and
emit events like start and end of the document, elements, text content
etc. So applications who are interested in processing these events can
register implementations of callback interfaces. SAX parser then only
sends those event messages which the application has demanded.
Full Interview Questions for .NET and SQL Server
http://www.geocities.com/dotnetinterviews/
Help the community to make job search easier mail your questions to
jo************* **@yahoo.co.in
Looking for a onsite job mail your resumes at
jo************* **@yahoo.co.in
For only Mumbai People Buy SQL Server Interview Question book and Take
..NET Interview Question free Call 022-22078296