OMXMLBuilderFactory.createOMBuilder(SAXSource, boolean) (if a
SAXSource is available or can be easily constructed), or create an
OMDocument (using OMFactory.createOMDocument()) and use
OMContainer.getSAXResult() to create a SAXResult for that document.
After writing the SAX events to the SAXResult, the root element of the
resulting tree can be retrieved using OMDocument.getOMDocumentElement(). If
the application code doesn't support SAXResult and needs to interface with a
ContentHandler directly, use SAXResult.getHandler() on the
SAXResult returned by OMContainer.getSAXResult().public class SAXOMBuilder extends org.xml.sax.helpers.DefaultHandler implements LexicalHandler, DeclHandler, org.apache.axiom.om.OMXMLParserWrapper
| Constructor and Description |
|---|
SAXOMBuilder()
Deprecated.
|
SAXOMBuilder(org.apache.axiom.om.OMFactory factory)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attributeDecl(String eName,
String aName,
String type,
String mode,
String value)
Deprecated.
|
void |
characterData(char[] ch,
int start,
int length,
int nodeType)
Deprecated.
|
void |
characters(char[] ch,
int start,
int length)
Deprecated.
|
void |
close()
Deprecated.
|
void |
comment(char[] ch,
int start,
int length)
Deprecated.
|
protected org.apache.axiom.om.OMElement |
createNextElement(String localName)
Deprecated.
|
void |
detach()
Deprecated.
|
void |
discard(org.apache.axiom.om.OMElement el)
Deprecated.
|
void |
elementDecl(String name,
String model)
Deprecated.
|
void |
endCDATA()
Deprecated.
|
void |
endDocument()
Deprecated.
|
void |
endDTD()
Deprecated.
|
void |
endElement(String uri,
String localName,
String qName)
Deprecated.
|
void |
endEntity(String name)
Deprecated.
|
void |
endPrefixMapping(String prefix)
Deprecated.
|
void |
externalEntityDecl(String name,
String publicId,
String systemId)
Deprecated.
|
short |
getBuilderType()
Deprecated.
|
String |
getCharacterEncoding()
Deprecated.
|
org.apache.axiom.om.OMDocument |
getDocument()
Deprecated.
|
org.apache.axiom.om.OMElement |
getDocumentElement()
Deprecated.
|
org.apache.axiom.om.OMElement |
getDocumentElement(boolean discardDocument)
Deprecated.
|
Object |
getParser()
Deprecated.
|
Object |
getRegisteredContentHandler()
Deprecated.
|
org.apache.axiom.om.OMElement |
getRootElement()
Deprecated.
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Deprecated.
|
void |
internalEntityDecl(String name,
String value)
Deprecated.
|
boolean |
isCache()
Deprecated.
|
boolean |
isCompleted()
Deprecated.
|
int |
next()
Deprecated.
|
void |
notationDecl(String name,
String publicId,
String systemId)
Deprecated.
|
void |
processingInstruction(String piTarget,
String data)
Deprecated.
|
void |
registerExternalContentHandler(Object obj)
Deprecated.
|
void |
setCache(boolean b)
Deprecated.
|
void |
setDocumentLocator(Locator locator)
Deprecated.
|
void |
skippedEntity(String name)
Deprecated.
|
void |
startCDATA()
Deprecated.
|
void |
startDocument()
Deprecated.
|
void |
startDTD(String name,
String publicId,
String systemId)
Deprecated.
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Deprecated.
|
void |
startEntity(String name)
Deprecated.
|
void |
startPrefixMapping(String prefix,
String uri)
Deprecated.
|
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
Deprecated.
|
error, fatalError, resolveEntity, warningpublic SAXOMBuilder(org.apache.axiom.om.OMFactory factory)
public SAXOMBuilder()
public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class org.xml.sax.helpers.DefaultHandlerpublic void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD in interface LexicalHandlerSAXExceptionpublic void elementDecl(String name, String model) throws SAXException
elementDecl in interface DeclHandlerSAXExceptionpublic void attributeDecl(String eName, String aName, String type, String mode, String value) throws SAXException
attributeDecl in interface DeclHandlerSAXExceptionpublic void externalEntityDecl(String name, String publicId, String systemId) throws SAXException
externalEntityDecl in interface DeclHandlerSAXExceptionpublic void internalEntityDecl(String name, String value) throws SAXException
internalEntityDecl in interface DeclHandlerSAXExceptionpublic void notationDecl(String name, String publicId, String systemId) throws SAXException
notationDecl in interface DTDHandlernotationDecl in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
unparsedEntityDecl in interface DTDHandlerunparsedEntityDecl in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void endDTD()
throws SAXException
endDTD in interface LexicalHandlerSAXExceptionprotected org.apache.axiom.om.OMElement createNextElement(String localName) throws org.apache.axiom.om.OMException
org.apache.axiom.om.OMExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerstartPrefixMapping in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerendPrefixMapping in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void startCDATA()
throws SAXException
startCDATA in interface LexicalHandlerSAXExceptionpublic void endCDATA()
throws SAXException
endCDATA in interface LexicalHandlerSAXExceptionpublic void characterData(char[] ch,
int start,
int length,
int nodeType)
throws SAXException
SAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void processingInstruction(String piTarget, String data) throws SAXException
processingInstruction in interface ContentHandlerprocessingInstruction in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void comment(char[] ch,
int start,
int length)
throws SAXException
comment in interface LexicalHandlerSAXExceptionpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerskippedEntity in class org.xml.sax.helpers.DefaultHandlerSAXExceptionpublic void startEntity(String name) throws SAXException
startEntity in interface LexicalHandlerSAXExceptionpublic void endEntity(String name) throws SAXException
endEntity in interface LexicalHandlerSAXExceptionpublic org.apache.axiom.om.OMDocument getDocument()
getDocument in interface org.apache.axiom.om.OMXMLParserWrapperpublic org.apache.axiom.om.OMElement getRootElement()
org.apache.axiom.om.OMException - if the tree is not completepublic int next()
throws org.apache.axiom.om.OMException
next in interface org.apache.axiom.om.OMXMLParserWrapperorg.apache.axiom.om.OMExceptionpublic void discard(org.apache.axiom.om.OMElement el)
throws org.apache.axiom.om.OMException
discard in interface org.apache.axiom.om.OMXMLParserWrapperorg.apache.axiom.om.OMExceptionpublic void setCache(boolean b)
throws org.apache.axiom.om.OMException
setCache in interface org.apache.axiom.om.OMXMLParserWrapperorg.apache.axiom.om.OMExceptionpublic boolean isCache()
isCache in interface org.apache.axiom.om.OMXMLParserWrapperpublic Object getParser()
getParser in interface org.apache.axiom.om.OMXMLParserWrapperpublic boolean isCompleted()
isCompleted in interface org.apache.axiom.om.OMXMLParserWrapperpublic org.apache.axiom.om.OMElement getDocumentElement()
getDocumentElement in interface org.apache.axiom.om.OMXMLParserWrapperpublic org.apache.axiom.om.OMElement getDocumentElement(boolean discardDocument)
getDocumentElement in interface org.apache.axiom.om.OMXMLParserWrapperpublic short getBuilderType()
getBuilderType in interface org.apache.axiom.om.OMXMLParserWrapperpublic void registerExternalContentHandler(Object obj)
registerExternalContentHandler in interface org.apache.axiom.om.OMXMLParserWrapperpublic Object getRegisteredContentHandler()
getRegisteredContentHandler in interface org.apache.axiom.om.OMXMLParserWrapperpublic String getCharacterEncoding()
getCharacterEncoding in interface org.apache.axiom.om.OMXMLParserWrapperpublic void close()
close in interface org.apache.axiom.om.OMXMLParserWrapperpublic void detach()
detach in interface org.apache.axiom.om.OMXMLParserWrapperCopyright © The Apache Software Foundation. All Rights Reserved.