Class SimpleXMLWriter
- java.lang.Object
-
- com.inductiveautomation.ignition.common.xmlserialization.simple.SimpleXMLWriter
-
- Direct Known Subclasses:
ClientTagExporter,HistoricalDataXmlWriter
public class SimpleXMLWriter extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SimpleXMLWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Flushes and finishes writing.java.lang.StringencodeValue(java.lang.Object val)Converts enum values to their integer equivalents, and also produces XML-sanitized strings for valuesvoidendElement()java.util.LocalegetLocale()voidinitialize(java.io.Writer writer)voidinitialize(java.lang.String file)voidsetLocale(java.util.Locale locale)voidstartElement(java.lang.String name, boolean oneLine, boolean noValue, java.lang.String... attributes)voidstartElement(java.lang.String name, boolean oneLine, boolean noValue, java.util.List<java.lang.String> attributes)voidstartElement(java.lang.String name, java.lang.String... attributes)Writes a staring element, with optional attributes.voidwriteElement(java.lang.String name, java.util.List<java.lang.String> attributes, java.lang.String value)Writes start and ending together on one line.protected voidwriteIndent(boolean isEnding)protected voidwriteLine(java.lang.String value)
-
-
-
Method Detail
-
initialize
public void initialize(java.lang.String file) throws java.io.IOException- Throws:
java.io.IOException
-
initialize
public void initialize(java.io.Writer writer)
-
getLocale
public java.util.Locale getLocale()
-
setLocale
public void setLocale(java.util.Locale locale)
-
close
public void close() throws java.io.IOExceptionFlushes and finishes writing.- Throws:
java.io.IOException
-
writeLine
protected void writeLine(java.lang.String value) throws java.io.IOException- Throws:
java.io.IOException
-
writeIndent
protected void writeIndent(boolean isEnding) throws java.io.IOException- Throws:
java.io.IOException
-
startElement
public void startElement(java.lang.String name, java.lang.String... attributes) throws java.io.IOExceptionWrites a staring element, with optional attributes. Attributes are an array, with a[x]=name,a[x+1]=value.- Throws:
java.io.IOException
-
startElement
public void startElement(java.lang.String name, boolean oneLine, boolean noValue, java.lang.String... attributes) throws java.io.IOException- Throws:
java.io.IOException
-
startElement
public void startElement(java.lang.String name, boolean oneLine, boolean noValue, java.util.List<java.lang.String> attributes) throws java.io.IOException- Throws:
java.io.IOException
-
endElement
public void endElement() throws java.io.IOException- Throws:
java.io.IOException
-
writeElement
public void writeElement(java.lang.String name, java.util.List<java.lang.String> attributes, java.lang.String value) throws java.io.IOExceptionWrites start and ending together on one line.- Throws:
java.io.IOException
-
encodeValue
public java.lang.String encodeValue(java.lang.Object val)
Converts enum values to their integer equivalents, and also produces XML-sanitized strings for values
-
-