Package org.eclnt.ccee.simplexml
Class SimpleXMLParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.eclnt.ccee.simplexml.SimpleXMLParser
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
Transfers XML that only consists out of elements with attributes into
an object view. This type of XML is the typical XML used in
configuration files.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
createXML
(SimpleXMLElement xe, boolean withSubElementSorting) void
endElement
(String uri, String localName, String qName) static SimpleXMLElement
static SimpleXMLElement
void
startElement
(String uri, String localName, String name, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
SimpleXMLParser
public SimpleXMLParser()
-
-
Method Details
-
startElement
public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
parseXML
-
parseXML
-
createXML
-
createXML
-