DOM & SAX
Subsections to be added soon
|
|
|
Document Object Model (DOM) & Simple API for XML (SAX)
|
- What is DOM?
Document Object Model (DOM), a programming interface specification being developed by the World Wide Web Consortium (W3C), lets a programmer create and modify HTML pages and XML document as full-fledged program object. The Document Object Model offers two levels of interface implementation: DOM Core, which supports XML and is the base for the next level, and DOM HTML, which extends the model to HTML documents.
Official W3C DOM Specification is here.
- What is SAX?
SAX (Simple API for XML) like DOM (Document Object Model) gives access to the information stored in XML documents using any programming language (and a parser for that language). However, both of them take very different approaches to giving you access to your information: DOM creates a tree of nodes (based on the structure and information in your XML document) and you can access your information by interacting with this tree of nodes. DOM gives you access to the information stored in your XML document as a hierarchical object model. The textual information in your XML document gets turned into a bunch of tree nodes. With SAX, the parser tells the application what is in the document by notifying the application of a stream of parsing events. Application then processes those events to act on data. SAX is very useful when the document is large.
Official SAX Specification is here.
We'll be adding new sections here soon. Till then enjoy the following articles.
-
Understanding DOM
Even before there was XML, there was the Document Object Model (DOM). The DOM allows a developer to refer to, retrieve, and change items within an XML structure, and is essential to working with XML. In this tutorial, you will learn about the structure of a DOM document. You will also learn how to use Java to create a document from an XML file, make changes to it, and retrieve the output.
-
Effective XML processing with DOM and XPath in Perl
Based on an analysis of several large XML projects, this article examines how to make effective and efficient use of DOM. Developer/author Tony Daruger provides a set of usage patterns and a library of functions to make DOM robust and easy to use. Though the DOM offers a flexible and powerful means for creating, processing, and manipulating XML documents, some aspects of DOM make it awkward to use and can lead to brittle and buggy code. This article suggests ways to avoid the pitfalls. Perl code samples demonstrate the techniques.
-
Understanding SAX
This tutorial examines the use of the Simple API for XML version 2.0, or SAX 2.0. It is aimed at developers who have an understanding of XML and wish to learn this lightweight, event-based API for working with XML data. It assumes that you are familiar with concepts such as well-formedness and the tag-like nature of an XML document. In this tutorial, you will learn how to use SAX to retrieve, manipulate, and output XML data.
-
XML Parsing With SAX and Xerces
The author examins the union of Java and XML, illustrating how the two technologies can be combined to easily parse XML data and convert it into browser-friendly HTML.
-
Chapter 8: Advanced C++ Aspects of SAX and DOM from the book C++ XML [PDF format file]
-
Introduction to DOM
-
MSXML 3.0 DOM User's Guide
-
Should I use SAX or DOM?
-
XML Parsers: DOM and SAX Put to the Test
-
DOM and SAX Are Dead, Long Live DOM and SAX
-
JDOM, the Java DOM
-
From Office DOM to XML DOM
-
The DOM Tutorial
-
A Beginner's Guide to the XML DOM
-
Understanding the Document Object Model
-
The DOM: Sample Chapter from Professional Java XML
-
Visual Basic and the XML DOM: An Annotated Example
-
SAX 1.0: The Simple API for XML
-
High-Performance XML Parsing With SAX
-
SAX Tutorial 1
-
Some fun with SAX
-
MSXML 3.0 SAX User's Guide
-
The joy of SAX
-
Use the Simple API for XML
-
XML DOM Level 1 implementations test suites from OASIS and NIST
|
|
|