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:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
,org.xml.sax.ext.LexicalHandler
public class Sax2Dom extends org.xml.sax.helpers.DefaultHandler implements org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EMPTYSTRING
static java.lang.String
XML_PREFIX
static java.lang.String
XMLNS_PREFIX
static java.lang.String
XMLNS_STRING
static java.lang.String
XMLNS_URI
-
Method Summary
All Methods Instance Methods Concrete Methods 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(java.lang.String namespace, java.lang.String localName, java.lang.String qName)
void
endEntity(java.lang.String name)
void
endPrefixMapping(java.lang.String prefix)
org.w3c.dom.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(java.lang.String target, java.lang.String data)
adds processing instruction node to DOM.void
setDocumentLocator(org.xml.sax.Locator locator)
This class is only used internally so this method should never be called.void
skippedEntity(java.lang.String name)
This class is only used internally so this method should never be called.void
startCDATA()
void
startDocument()
void
startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
void
startElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)
void
startEntity(java.lang.String name)
void
startPrefixMapping(java.lang.String prefix, java.lang.String uri)
-
-
-
Field Detail
-
EMPTYSTRING
public static final java.lang.String EMPTYSTRING
- See Also:
- Constant Field Values
-
XML_PREFIX
public static final java.lang.String XML_PREFIX
- See Also:
- Constant Field Values
-
XMLNS_PREFIX
public static final java.lang.String XMLNS_PREFIX
- See Also:
- Constant Field Values
-
XMLNS_STRING
public static final java.lang.String XMLNS_STRING
- See Also:
- Constant Field Values
-
XMLNS_URI
public static final java.lang.String XMLNS_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Sax2Dom
public Sax2Dom() throws javax.xml.parsers.ParserConfigurationException
- Throws:
javax.xml.parsers.ParserConfigurationException
-
Sax2Dom
public Sax2Dom(org.w3c.dom.Node root) throws javax.xml.parsers.ParserConfigurationException
- Throws:
javax.xml.parsers.ParserConfigurationException
-
-
Method Detail
-
getDOM
public org.w3c.dom.Node getDOM()
-
characters
public void characters(char[] ch, int start, int length)
- Specified by:
characters
in interfaceorg.xml.sax.ContentHandler
- Overrides:
characters
in classorg.xml.sax.helpers.DefaultHandler
-
startDocument
public void startDocument()
- Specified by:
startDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startDocument
in classorg.xml.sax.helpers.DefaultHandler
-
endDocument
public void endDocument()
- Specified by:
endDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endDocument
in classorg.xml.sax.helpers.DefaultHandler
-
startElement
public void startElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)
- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
-
endElement
public void endElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName)
- Specified by:
endElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endElement
in classorg.xml.sax.helpers.DefaultHandler
-
startPrefixMapping
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
- Specified by:
startPrefixMapping
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startPrefixMapping
in classorg.xml.sax.helpers.DefaultHandler
-
endPrefixMapping
public void endPrefixMapping(java.lang.String prefix)
- Specified by:
endPrefixMapping
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endPrefixMapping
in classorg.xml.sax.helpers.DefaultHandler
-
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 interfaceorg.xml.sax.ContentHandler
- Overrides:
ignorableWhitespace
in classorg.xml.sax.helpers.DefaultHandler
-
processingInstruction
public void processingInstruction(java.lang.String target, java.lang.String data)
adds processing instruction node to DOM.- Specified by:
processingInstruction
in interfaceorg.xml.sax.ContentHandler
- Overrides:
processingInstruction
in classorg.xml.sax.helpers.DefaultHandler
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
This class is only used internally so this method should never be called.- Specified by:
setDocumentLocator
in interfaceorg.xml.sax.ContentHandler
- Overrides:
setDocumentLocator
in classorg.xml.sax.helpers.DefaultHandler
-
skippedEntity
public void skippedEntity(java.lang.String name)
This class is only used internally so this method should never be called.- Specified by:
skippedEntity
in interfaceorg.xml.sax.ContentHandler
- Overrides:
skippedEntity
in classorg.xml.sax.helpers.DefaultHandler
-
comment
public void comment(char[] ch, int start, int length)
Lexical Handler method to create comment node in DOM tree.- Specified by:
comment
in interfaceorg.xml.sax.ext.LexicalHandler
-
startCDATA
public void startCDATA()
- Specified by:
startCDATA
in interfaceorg.xml.sax.ext.LexicalHandler
-
endCDATA
public void endCDATA()
- Specified by:
endCDATA
in interfaceorg.xml.sax.ext.LexicalHandler
-
startEntity
public void startEntity(java.lang.String name)
- Specified by:
startEntity
in interfaceorg.xml.sax.ext.LexicalHandler
-
endEntity
public void endEntity(java.lang.String name)
- Specified by:
endEntity
in interfaceorg.xml.sax.ext.LexicalHandler
-
startDTD
public void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXException
- Specified by:
startDTD
in interfaceorg.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
-
endDTD
public void endDTD()
- Specified by:
endDTD
in interfaceorg.xml.sax.ext.LexicalHandler
-
-