Package org.apache.xmlbeans.impl.common
Class Sax2Dom
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.xmlbeans.impl.common.Sax2Dom
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
public class Sax2Dom extends DefaultHandler implements ContentHandler, LexicalHandler
-
Field Summary
Fields Modifier and Type Field Description static String
EMPTYSTRING
static String
XML_PREFIX
static String
XMLNS_PREFIX
static String
XMLNS_STRING
static String
XMLNS_URI
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
comment(char[] ch, int start, int length)
Lexical Handler method to create comment node in DOM tree.void
endCDATA()
void
endDocument()
void
endDTD()
void
endElement(String namespace, String localName, String qName)
void
endEntity(String name)
void
endPrefixMapping(String prefix)
Node
getDOM()
void
ignorableWhitespace(char[] ch, int start, int length)
This class is only used internally so this method should never be called.void
processingInstruction(String target, String data)
adds processing instruction node to DOM.void
setDocumentLocator(Locator locator)
This class is only used internally so this method should never be called.void
skippedEntity(String name)
This class is only used internally so this method should never be called.void
startCDATA()
void
startDocument()
void
startDTD(String name, String publicId, String systemId)
void
startElement(String namespace, String localName, String qName, Attributes attrs)
void
startEntity(String name)
void
startPrefixMapping(String prefix, String uri)
Methods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
-
Field Details
-
EMPTYSTRING
- See Also:
- Constant Field Values
-
XML_PREFIX
- See Also:
- Constant Field Values
-
XMLNS_PREFIX
- See Also:
- Constant Field Values
-
XMLNS_STRING
- See Also:
- Constant Field Values
-
XMLNS_URI
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Sax2Dom
- Throws:
ParserConfigurationException
-
Sax2Dom
- Throws:
ParserConfigurationException
-
-
Method Details
-
getDOM
-
characters
public void characters(char[] ch, int start, int length)- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-
startDocument
public void startDocument()- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
-
endDocument
public void endDocument()- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
-
startElement
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classDefaultHandler
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Overrides:
endPrefixMapping
in classDefaultHandler
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length)This class is only used internally so this method should never be called.- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Overrides:
ignorableWhitespace
in classDefaultHandler
-
processingInstruction
adds processing instruction node to DOM.- Specified by:
processingInstruction
in interfaceContentHandler
- Overrides:
processingInstruction
in classDefaultHandler
-
setDocumentLocator
This class is only used internally so this method should never be called.- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classDefaultHandler
-
skippedEntity
This class is only used internally so this method should never be called.- Specified by:
skippedEntity
in interfaceContentHandler
- Overrides:
skippedEntity
in classDefaultHandler
-
comment
public void comment(char[] ch, int start, int length)Lexical Handler method to create comment node in DOM tree.- Specified by:
comment
in interfaceLexicalHandler
-
startCDATA
public void startCDATA()- Specified by:
startCDATA
in interfaceLexicalHandler
-
endCDATA
public void endCDATA()- Specified by:
endCDATA
in interfaceLexicalHandler
-
startEntity
- Specified by:
startEntity
in interfaceLexicalHandler
-
endEntity
- Specified by:
endEntity
in interfaceLexicalHandler
-
startDTD
- Specified by:
startDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
endDTD
public void endDTD()- Specified by:
endDTD
in interfaceLexicalHandler
-