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 TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) protected org.apache.log4j.LoggervoidendElement(String uri, String localName, String name) voidvoidprotected Elementprotected final LoggerExCan be called to get the value on the root element.protected voidparseString(String xml) Works the same as parseFile, but allows a String to be passed instead of a filevoidsetDocumentLocator(Locator locator) voidstartElement(String uri, String localName, String name, Attributes attributes) voidMethods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDeclMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin 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:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
error
- Specified by:
errorin interfaceErrorHandler- Overrides:
errorin classDefaultHandler- Throws:
SAXException
-
warning
- Specified by:
warningin interfaceErrorHandler- Overrides:
warningin classDefaultHandler- Throws:
SAXException
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Overrides:
fatalErrorin classDefaultHandler- Throws:
SAXException
-