Package com.powsybl.commons.xml
Class XmlUtil
java.lang.Object
com.powsybl.commons.xml.XmlUtil
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
gcXmlInputFactory
(XMLInputFactory xmlInputFactory) static XMLStreamWriter
initializeWriter
(boolean indent, String indentString, OutputStream os) static XMLStreamWriter
initializeWriter
(boolean indent, String indentString, OutputStream os, Charset charset) static XMLStreamWriter
initializeWriter
(boolean indent, String indentString, Writer writer) static Boolean
readBooleanAttribute
(XMLStreamReader reader, String name) static boolean
readBooleanAttribute
(XMLStreamReader reader, String name, boolean defaultValue) static double
readDoubleAttribute
(XMLStreamReader reader, String name, double defaultValue) static void
readEndElementOrThrow
(XMLStreamReader reader) static float
readFloatAttribute
(XMLStreamReader reader, String name, float defaultValue) static int
readIntAttribute
(XMLStreamReader reader, String name, int defaultValue) static Integer
readIntegerAttribute
(XMLStreamReader reader, String name) static void
readSubElements
(XMLStreamReader reader, TreeDataReader.ChildNodeReader childNodeReader) static String
readText
(XMLStreamReader reader) static void
readUntilStartElement
(String[] elements, XMLStreamReader reader, TreeDataReader.ChildNodeReader handler) static void
readUntilStartElement
(String path, XMLStreamReader reader, TreeDataReader.ChildNodeReader handler) static void
skipSubElements
(XMLStreamReader reader)
-
Method Details
-
readUntilStartElement
public static void readUntilStartElement(String path, XMLStreamReader reader, TreeDataReader.ChildNodeReader handler) throws XMLStreamException - Throws:
XMLStreamException
-
readUntilStartElement
public static void readUntilStartElement(String[] elements, XMLStreamReader reader, TreeDataReader.ChildNodeReader handler) throws XMLStreamException - Throws:
XMLStreamException
-
skipSubElements
-
readSubElements
public static void readSubElements(XMLStreamReader reader, TreeDataReader.ChildNodeReader childNodeReader) -
readText
- Throws:
XMLStreamException
-
readIntegerAttribute
-
readIntAttribute
-
readBooleanAttribute
-
readBooleanAttribute
public static boolean readBooleanAttribute(XMLStreamReader reader, String name, boolean defaultValue) -
readDoubleAttribute
-
readFloatAttribute
-
initializeWriter
public static XMLStreamWriter initializeWriter(boolean indent, String indentString, OutputStream os) throws XMLStreamException - Throws:
XMLStreamException
-
initializeWriter
public static XMLStreamWriter initializeWriter(boolean indent, String indentString, OutputStream os, Charset charset) throws XMLStreamException - Throws:
XMLStreamException
-
initializeWriter
public static XMLStreamWriter initializeWriter(boolean indent, String indentString, Writer writer) throws XMLStreamException - Throws:
XMLStreamException
-
gcXmlInputFactory
-
readEndElementOrThrow
- Throws:
XMLStreamException
-