org.apache.batik.dom.util
public class SAXDocumentFactory extends DefaultHandler implements LexicalHandler, DocumentFactory
Nested Class Summary | |
---|---|
protected interface | SAXDocumentFactory.PreInfo |
Field Summary | |
---|---|
protected boolean | createDocumentDescriptor
Whether a document descriptor must be generated. |
protected Node | currentNode
The current node. |
protected Document | document
The created document. |
protected DocumentDescriptor | documentDescriptor
The created document descriptor. |
protected ErrorHandler | errorHandler
The error handler. |
protected DOMImplementation | implementation
The DOM implementation used to create the document. |
protected boolean | inCDATA
True if the parser is currently parsing a CDATA section. |
protected boolean | inDTD
True if the parser is currently parsing a DTD. |
protected boolean | inProlog
Whether the parser still hasn't read the document element's
opening tag. |
protected boolean | isStandalone
Whether the document just parsed was standalone. |
protected boolean | isValidating
Whether the parser is in validating mode. |
protected Locator | locator
The locator. |
protected HashTableStack | namespaces
The stack used to store the namespace URIs. |
protected XMLReader | parser
The SAX2 parser object. |
protected String | parserClassName
The SAX2 parser classname. |
protected List | preInfo
Various elements encountered prior to real document root element.
|
protected StringBuffer | stringBuffer
Contains collected string data. |
protected boolean | stringContent
Indicates if stringBuffer has content, needed in case of
zero sized "text" content. |
protected String | xmlVersion
XML version of the document just parsed. |
Constructor Summary | |
---|---|
SAXDocumentFactory(DOMImplementation impl, String parser)
Creates a new SAXDocumentFactory object.
| |
SAXDocumentFactory(DOMImplementation impl, String parser, boolean dd)
Creates a new SAXDocumentFactory object. |
Method Summary | |
---|---|
void | appendStringData() |
void | characters(char[] ch, int start, int length)
SAX: Implements org.xml.sax.ContentHandler#characters(char[],int,int) . |
void | comment(char[] ch, int start, int length)
SAX: Implements
org.xml.sax.ext.LexicalHandler#comment(char[],int,int) . |
Document | createDocument(String ns, String root, String uri)
Creates a Document instance. |
Document | createDocument(String uri)
Creates a Document instance. |
Document | createDocument(String ns, String root, String uri, InputStream is)
Creates a Document instance. |
Document | createDocument(String uri, InputStream is)
Creates a Document instance. |
Document | createDocument(String ns, String root, String uri, Reader r)
Creates a Document instance. |
Document | createDocument(String ns, String root, String uri, XMLReader r)
Creates a Document instance. |
Document | createDocument(String uri, Reader r)
Creates a Document instance. |
protected Document | createDocument(String ns, String root, String uri, InputSource is)
Creates a Document. |
protected Document | createDocument(InputSource is)
Creates a Document. |
void | endCDATA()
SAX: Implements org.xml.sax.ext.LexicalHandler#endCDATA(). |
void | endDTD()
SAX: Implements org.xml.sax.ext.LexicalHandler#endDTD(). |
void | endElement(String uri, String localName, String rawName)
SAX: Implements org.xml.sax.ContentHandler#endElement(String,String,String). |
void | endEntity(String name)
SAX: Implements
org.xml.sax.ext.LexicalHandler#endEntity(String). |
void | error(SAXParseException ex)
SAX: Implements org.xml.sax.ErrorHandler#error(SAXParseException). |
void | fatalError(SAXParseException ex)
SAX: Implements org.xml.sax.ErrorHandler#fatalError(SAXParseException). |
DocumentDescriptor | getDocumentDescriptor()
Returns the document descriptor associated with the latest created
document. |
DOMImplementation | getDOMImplementation(String ver) |
void | ignorableWhitespace(char[] ch, int start, int length)
SAX: Implements org.xml.sax.ContentHandler#ignorableWhitespace(char[],int,int) . |
boolean | isValidating()
Returns true if the XML parser validates the XML stream, false
otherwise. |
void | processingInstruction(String target, String data)
SAX: Implements org.xml.sax.ContentHandler#processingInstruction(String,String). |
void | setDocumentLocator(Locator l)
SAX: Implements org.xml.sax.ContentHandler#setDocumentLocator(Locator). |
void | setErrorHandler(ErrorHandler eh)
Sets a custom error handler. |
void | setValidating(boolean isValidating)
Sets whether or not the XML parser will validate the XML document
depending on the specified parameter.
|
void | startCDATA()
SAX: Implements org.xml.sax.ext.LexicalHandler#startCDATA(). |
void | startDocument()
SAX: Implements org.xml.sax.ContentHandler#startDocument(). |
void | startDTD(String name, String publicId, String systemId)
SAX: Implements org.xml.sax.ext.LexicalHandler#startDTD(String,String,String). |
void | startElement(String uri, String localName, String rawName, Attributes attributes)
SAX: Implements org.xml.sax.ContentHandler#startElement(String,String,String,Attributes). |
void | startEntity(String name)
SAX: Implements
org.xml.sax.ext.LexicalHandler#startEntity(String). |
void | warning(SAXParseException ex)
SAX: Implements org.xml.sax.ErrorHandler#warning(SAXParseException). |
Parameters: impl The DOM implementation to use for building the DOM tree. parser The SAX2 parser classname.
Parameters: impl The DOM implementation to use for building the DOM tree. parser The SAX2 parser classname. dd Whether a document descriptor must be generated.
org.xml.sax.ContentHandler#characters(char[],int,int)
.org.xml.sax.ext.LexicalHandler#comment(char[],int,int)
.Parameters: ns The namespace URI of the root element of the document. root The name of the root element of the document. uri The document URI.
Throws: IOException if an error occured while reading the document.
Parameters: uri The document URI.
Throws: IOException if an error occured while reading the document.
Parameters: ns The namespace URI of the root element of the document. root The name of the root element of the document. uri The document URI. is The document input stream.
Throws: IOException if an error occured while reading the document.
Parameters: uri The document URI. is The document input stream.
Throws: IOException if an error occured while reading the document.
Parameters: ns The namespace URI of the root element of the document. root The name of the root element of the document. uri The document URI. r The document reader.
Throws: IOException if an error occured while reading the document.
Parameters: ns The namespace URI of the root element of the document. root The name of the root element of the document. uri The document URI. r an XMLReaderInstance
Throws: IOException if an error occured while reading the document.
Parameters: uri The document URI. r The document reader.
Throws: IOException if an error occured while reading the document.
Parameters: ns The namespace URI of the root element. root The name of the root element. uri The document URI. is The document input source.
Throws: IOException if an error occured while reading the document.
Parameters: is The document input source.
Throws: IOException if an error occured while reading the document.
Returns: null if no document or descriptor was previously generated.
org.xml.sax.ContentHandler#ignorableWhitespace(char[],int,int)
.Parameters: isValidating indicates that the XML parser will validate the XML document