Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
580
Xalan: The org.apache.xalan.xsltc.trax.DOM2SAX Class
The
main purpose of this class is to provide bridge from DOM to SAX. This can be
guessed from the name of this class. Most of the methods in this class are used
internally. However, I have given examples of those methods useful to the User.
This class implements org.xmlsax.XMLReader so by default it allows an
application to set and query features and properties in the parser, to register
event handlers for document processing, and to initiate a document parse.
Method Overviews
As I
have mentioned earlier, methods in this class are used internally. Also I have
mentioned that this class provides a bridge from DOM to SAX. Sometimes during
programming, we need to parser a org.w3c.dom.Document using SAX parser so that
we can implement business logic. But this does not occur always. Generally we
use Inputsource, File or URIs for parsing in SAX parser. But we occasionally
parse org.w3c.dom.Document using SAX Parser. This class provides methods to
parser a org.w3c.dom.Document, set setContentHandler
for event handling, setEntityResolver
for associating an EntityResolver, setErrorHandler for associating an
ErrorHandler and , setDTDHandler for handling DTD related handlers.
Example of creating an instance of DOM2SAX:
/**
* This method gives example of how to use DOM2SAX for parsing
a org.w3c.dom.Document