IBM Version 5 Universal Remote User Manual


 
58 The XML Files: Development of XML/XSL Applications Using WebSphere Studio
Figure 3-2 javax.xml.transforms interfaces operation
3.3 SAX2
SAX is the Simple API for XML, originally a Java-only API. SAX was the first
wisely adopted API for XML in Java. SAX APIs are event-based APIs, which
report parsing events (such as start and end elements) directly to the application
through callbacks, and does not usually build an internal tree. These event-driven
APIs are used for accessing XML documents and extracting information from
them. They cannot be used to manipulate the internal structures of XML
documents. As the XML document is parsed, the application using SAX receives
information about the various parsing events. The application implements
handlers to deal with these different events, much like handling events in a
graphical user interface. The logical structure of an application using SAX API
with the parser is shown in Figure 3-3. You can parse documents much larger
than your available system memory, and you can construct your own data
structures using your callback event handlers.
TransformerFactory
Te m p l a t e s
(stylesheet)
Source
DOM
Result
SAX
Result
Stream
Result
SAX
Source
Stream
Source
DOM
Source
Result
Transformation
creates
output
invokes
input
source specification
result specification