org.apache.xmlbeans.impl.common
Class Sax2Dom

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.xmlbeans.impl.common.Sax2Dom
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, LexicalHandler

public class Sax2Dom
extends DefaultHandler
implements ContentHandler, LexicalHandler


Field Summary
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
           
 
Constructor Summary
Sax2Dom()
           
Sax2Dom(Node root)
           
 
Method Summary
 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)
           
 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(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, Attributes attrs)
           
 void startEntity(java.lang.String name)
           
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(Node root)
        throws javax.xml.parsers.ParserConfigurationException
Throws:
javax.xml.parsers.ParserConfigurationException
Method Detail

getDOM

public Node getDOM()

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler

startDocument

public void startDocument()
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class DefaultHandler

endDocument

public void endDocument()
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class DefaultHandler

startElement

public void startElement(java.lang.String namespace,
                         java.lang.String localName,
                         java.lang.String qName,
                         Attributes attrs)
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler

endElement

public void endElement(java.lang.String namespace,
                       java.lang.String localName,
                       java.lang.String qName)
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class DefaultHandler

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
Specified by:
endPrefixMapping in interface ContentHandler
Overrides:
endPrefixMapping in class 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 interface ContentHandler
Overrides:
ignorableWhitespace in class DefaultHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
adds processing instruction node to DOM.

Specified by:
processingInstruction in interface ContentHandler
Overrides:
processingInstruction in class DefaultHandler

setDocumentLocator

public void setDocumentLocator(Locator locator)
This class is only used internally so this method should never be called.

Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class 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 interface ContentHandler
Overrides:
skippedEntity in class 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 interface LexicalHandler

startCDATA

public void startCDATA()
Specified by:
startCDATA in interface LexicalHandler

endCDATA

public void endCDATA()
Specified by:
endCDATA in interface LexicalHandler

startEntity

public void startEntity(java.lang.String name)
Specified by:
startEntity in interface LexicalHandler

endEntity

public void endEntity(java.lang.String name)
Specified by:
endEntity in interface LexicalHandler

startDTD

public void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws SAXException
Specified by:
startDTD in interface LexicalHandler
Throws:
SAXException

endDTD

public void endDTD()
Specified by:
endDTD in interface LexicalHandler