public class XMLElementCreationHandler
extends org.xml.sax.helpers.DefaultHandler
XMLElements.
Copyright Micro Focus GmbH.
| Constructor and Description |
|---|
XMLElementCreationHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] pCh,
int pStart,
int pLength) |
void |
endDocument() |
void |
endElement(java.lang.String pUri,
java.lang.String pLocalName,
java.lang.String pQName) |
void |
error(org.xml.sax.SAXParseException pE) |
IXMLElement |
getRootElement()
Gets the parsed root element.
|
void |
startElement(java.lang.String pUri,
java.lang.String pLocalName,
java.lang.String pQName,
org.xml.sax.Attributes pAttributes) |
java.lang.String |
toString(IXMLElement pElement)
For testing purposes only.
|
public void startElement(java.lang.String pUri,
java.lang.String pLocalName,
java.lang.String pQName,
org.xml.sax.Attributes pAttributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void endElement(java.lang.String pUri,
java.lang.String pLocalName,
java.lang.String pQName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void characters(char[] pCh,
int pStart,
int pLength)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void error(org.xml.sax.SAXParseException pE)
throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic java.lang.String toString(IXMLElement pElement)
Converts the given element into a hierarchical structure showing all the elements children (recursive, including attributes).
pElement - the element to convertpublic IXMLElement getRootElement()
null if the XML file did not
contain any elementCopyright © 2015 Micro Focus GmbH. All rights reserved.