0% found this document useful (0 votes)
16 views12 pages

XML Dom

The document discusses XML DOM which defines a standard way for accessing and manipulating XML documents by presenting them as a tree structure. It also discusses SAX parser which parses XML files line by line by triggering events and compares SAX, DOM and StAX parsers. An example program using SAX parser is also mentioned.

Uploaded by

Mehala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views12 pages

XML Dom

The document discusses XML DOM which defines a standard way for accessing and manipulating XML documents by presenting them as a tree structure. It also discusses SAX parser which parses XML files line by line by triggering events and compares SAX, DOM and StAX parsers. An example program using SAX parser is also mentioned.

Uploaded by

Mehala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

XML DOM

• The W3C Document Object Model (DOM) is a platform and language-


neutral interface that allows programs and scripts to dynamically
access and update the content, structure, and style of a document."

• The XML DOM defines a standard way for accessing and manipulating
XML documents.

• It presents an XML document as a tree-structure.


XML DOM
XML DOM Example : Load XML File
• This example parses an XML
document (note.xml) into an
XML DOM object and extracts
information from it with
JavaScript.
XML DOM Example : Load XML String
SAX Parser
• SAX is an acronym for Simple API for XML.
• SAX Parser parses the XML file line by line and triggers events when it
encounters opening tag, closing tag or character data in XML file.
• This is why SAX parser is called an event-based parser
Comparison between SAX, DOM and StAX
parser:
Project Structure
Example Program using SAX Parser
• XML SAX Parser Example.docx

You might also like