|
Java API for XML processing (JAXP) lets you access XML documents
either serially (SAX) or in random access mode (DOM).
DOM Examples
SAX Examples
-
ChessBoardSAXPrinter.java
outputs the averaged elapsed time to process a document.
For more information see
Java Technology and XML - Part 2.
-
Echo01.java
echoes SAX parser events to
System.out.
slideSample01.xml is the XML file the code operates on, and
slideSample01-xml.html is the browsable version.
For more information see
The XML Tutorial.
- Echo02.java
is another version of the
Echo1.java
program that displays an XML file, but the output is not that readable.
slideSample01.xml is
the XML file the code operates on, and
slideSample01-xml.html
is the browsable version.
For more information see
The XML Tutorial.
- Echo03.java
is a version of the
Echo2.java
with more readable output.
slideSample01.xml is
the XML file the code operates on, and
slideSample01-xml.html
is the browsable version.
For more information see
The XML Tutorial.
- Echo04.java
gets the document locator and uses it to echo the document's system ID.
slideSample01.xml is
the XML file the code operates on, and
slideSample01-xml.html
is the browsable version.
For more information see
The XML Tutorial.
- Echo05.java
adds a processing instruction to
slideSample02.xml.
slideSample02-xml.html
is the browsable version.
For more information see
The XML Tutorial.
- Echo06.java
handles a fatal error.
For more information see
The XML Tutorial.
- Echo07.java
handles a non-fatal error.
For more information see
The XML Tutorial.
- Echo08.java
processes and echoes ignorable white space.
For more information see
The XML Tutorial.
- Echo09.java
is a version of Echo08.java
with the code for processing and echoing ignorable white space removed.
For more information see
The XML Tutorial.
- Echo10.java
uses a validating parser.
For more information see
The XML Tutorial.
- Echo11.java
has a lexical handler.
For more information see
The XML Tutorial.
- EntityCache.java
shows a simple cache implementation for external entities.
For more information see
Java Technology and XML: Performance Improvement Tips.
-
JDBCSAXParser.java
iterates over database table rows and columns and generates SAX events along the way.
For supporting information see,
XML APIs for
Databases
-
JDBCInputSource.java
extends the
org.xml.sax.InputSource class to implement a parser that operates on a JDBC
data source, iterates over each row and column, and generates appropriate SAX events while iterating.
For supporting information see,
XML APIs for
Databases
- MySAXParserBean.java
invokes the
startElement method at the beginning of every element in the XML document, and
the characters method to report each chunk of character data, and finally,
the endElement method at the end of every element in the XML document.
For more information see
Web Application Development
with JSP Technology and XML..
XML Style Sheet language (XSLT)
|