View RSS Feed

Java XML

SAX and DOM APIs

Rate this Entry
by , 04-27-2012 at 05:14 PM (583 Views)
The SAX API is event-based. XML parsers that implement the SAX API generate events that correspond to different features found in the parsed XML document. By responding to this stream of SAX events in Java code, you can write programs driven by XML-based data.

The DOM API is an object-model-based API. XML parsers that implement DOM create a generic object model in memory that represents the contents of the XML document. Once the XML parser has completed parsing, the memory contains a tree of DOM objects that offers information about both the structure and contents of the XML document.

The DOM concept grew out of the HTML browser world, where a common document object model represents the HTML document loaded in the browser. This HTML DOM then becomes available for scripting languages like JavaScript. HTML DOM has been very successful in this application.

Submit "SAX and DOM APIs" to Facebook Submit "SAX and DOM APIs" to Digg Submit "SAX and DOM APIs" to del.icio.us Submit "SAX and DOM APIs" to StumbleUpon Submit "SAX and DOM APIs" to Google

Tags: sax Add / Edit Tags
Categories
SAX.

Comments