XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.

advertisement
 Resource Guide -> XML and PHP Tutorials, SAX vs. DOM -> DOM XML: An Alternative to Expat

DOM XML: An Alternative to Expat

Date: Jan. 15, 2001
Link: http://www.phpbuilder.com/columns/matt20001228.php3
Source Author or Organization: Matt Dunford, PHPBuilder

In this article the author explores an alternative to widespread implementation of the event driven Simple Application Programming Interface for XML (SAX) by PHP coders; using the Document Object Model (DOM) to parse XML.

Although the DOM model can be somewhat memory intensive, the way it loads an entire xml document into memory as a hierarchy and makes the data available to the programmer as a tree structure can be more intuitive, and affords better readability. The tutorial covers how the DOM structures XML and how objects are used.

The piece also explains many properties and methods, as well as how to configure PHP to use DOM functions (not a part of the standard configuration) by specifying the '--with-dom' argument.