org.apache.axiom.om.impl.builder
Class SAXOMBuilder

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.axiom.om.impl.builder.SAXOMBuilder
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, LexicalHandler

public class SAXOMBuilder
extends DefaultHandler
implements LexicalHandler


Constructor Summary
SAXOMBuilder()
           
SAXOMBuilder(OMFactory factory)
           
 
Method Summary
 void characterData(char[] ch, int start, int length, int nodeType)
           
 void characters(char[] ch, int start, int length)
           
 void comment(char[] ch, int start, int length)
           
protected  OMElement createNextElement(String localName)
           
 void endCDATA()
           
 void endDocument()
           
 void endDTD()
           
 void endElement(String arg0, String arg1, String arg2)
           
 void endEntity(String name)
           
 void endPrefixMapping(String arg0)
           
 OMDocument getDocument()
           
 OMElement getRootElement()
          Get the root element of the Axiom tree built by this content handler.
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void processingInstruction(String target, String data)
           
 void setDocumentLocator(Locator arg0)
           
 void skippedEntity(String arg0)
           
 void startCDATA()
           
 void startDocument()
           
 void startDTD(String name, String publicId, String systemId)
           
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXOMBuilder

public SAXOMBuilder(OMFactory factory)

SAXOMBuilder

public SAXOMBuilder()
Method Detail

setDocumentLocator

public void setDocumentLocator(Locator arg0)
Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class DefaultHandler

startDocument

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

endDocument

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

startDTD

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

endDTD

public void endDTD()
            throws SAXException
Specified by:
endDTD in interface LexicalHandler
Throws:
SAXException

createNextElement

protected OMElement createNextElement(String localName)
                               throws OMException
Throws:
OMException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class DefaultHandler
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String arg0)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
Overrides:
endPrefixMapping in class DefaultHandler
Throws:
SAXException

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String arg0,
                       String arg1,
                       String arg2)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException

startCDATA

public void startCDATA()
                throws SAXException
Specified by:
startCDATA in interface LexicalHandler
Throws:
SAXException

endCDATA

public void endCDATA()
              throws SAXException
Specified by:
endCDATA in interface LexicalHandler
Throws:
SAXException

characterData

public void characterData(char[] ch,
                          int start,
                          int length,
                          int nodeType)
                   throws SAXException
Throws:
SAXException

characters

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

ignorableWhitespace

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

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
Specified by:
processingInstruction in interface ContentHandler
Overrides:
processingInstruction in class DefaultHandler
Throws:
SAXException

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws SAXException
Specified by:
comment in interface LexicalHandler
Throws:
SAXException

skippedEntity

public void skippedEntity(String arg0)
                   throws SAXException
Specified by:
skippedEntity in interface ContentHandler
Overrides:
skippedEntity in class DefaultHandler
Throws:
SAXException

startEntity

public void startEntity(String name)
                 throws SAXException
Specified by:
startEntity in interface LexicalHandler
Throws:
SAXException

endEntity

public void endEntity(String name)
               throws SAXException
Specified by:
endEntity in interface LexicalHandler
Throws:
SAXException

getDocument

public OMDocument getDocument()

getRootElement

public OMElement getRootElement()
Get the root element of the Axiom tree built by this content handler.

Returns:
the root element of the tree
Throws:
OMException - if the tree is not complete


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.