Class SimpleXMLReader<T>
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.inductiveautomation.ignition.common.xmlserialization.simple.SimpleXMLReader<T>
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
- Direct Known Subclasses:
HistoricalDataXmlReader
,TagXMLImporter.TagXMLReader
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) protected org.apache.log4j.Logger
void
endElement
(String uri, String localName, String name) void
void
protected Element
protected final LoggerEx
Can be called to get the value on the root element.protected void
parseString
(String xml) Works the same as parseFile, but allows a String to be passed instead of a filevoid
setDocumentLocator
(Locator locator) void
startElement
(String uri, String localName, String name, Attributes attributes) void
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
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
-
Field Details
-
elemTypeDictionary
-
-
Constructor Details
-
SimpleXMLReader
protected SimpleXMLReader()
-
-
Method Details
-
getLogger
-
createLogger
protected org.apache.log4j.Logger createLogger() -
initializeMappings
protected void initializeMappings() -
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classDefaultHandler
-
parseFile
- Throws:
Exception
-
parseString
Works the same as parseFile, but allows a String to be passed instead of a file- Throws:
Exception
-
getParsedValue
Can be called to get the value on the root element. Should only be called after parsing is finished. -
getElementStack
-
getCurrentElement
-
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
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
- Throws:
SAXException
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Overrides:
warning
in classDefaultHandler
- Throws:
SAXException
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Overrides:
fatalError
in classDefaultHandler
- Throws:
SAXException
-