Package com.powsybl.commons.xml
Class XmlReader
java.lang.Object
com.powsybl.commons.io.AbstractTreeDataReader
com.powsybl.commons.xml.XmlReader
- All Implemented Interfaces:
TreeDataReader
,AutoCloseable
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.powsybl.commons.io.TreeDataReader
TreeDataReader.ChildNodeReader
-
Constructor Summary
ConstructorDescriptionXmlReader
(InputStream is, Map<String, String> namespaceVersionMap, Collection<ExtensionSerDe> extensionProviders) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
readBooleanAttribute
(String name) boolean
readBooleanAttribute
(String name, boolean defaultValue) void
readChildNodes
(TreeDataReader.ChildNodeReader childNodeReader) double
readDoubleAttribute
(String name, double defaultValue) void
float
readFloatAttribute
(String name, float defaultValue) readIntArrayAttribute
(String name) int
readIntAttribute
(String name) int
readIntAttribute
(String name, int defaultValue) readStringAttribute
(String name) Methods inherited from class com.powsybl.commons.io.AbstractTreeDataReader
readDoubleAttribute, readEnumAttribute, readEnumAttribute, readFloatAttribute, readHeader, skipChildNodes
-
Constructor Details
-
XmlReader
public XmlReader(InputStream is, Map<String, String> namespaceVersionMap, Collection<ExtensionSerDe> extensionProviders) throws XMLStreamException- Throws:
XMLStreamException
-
-
Method Details
-
readRootVersion
- Specified by:
readRootVersion
in classAbstractTreeDataReader
-
readExtensionVersions
- Specified by:
readExtensionVersions
in classAbstractTreeDataReader
-
readDoubleAttribute
-
readOptionalDoubleAttribute
-
readFloatAttribute
-
readStringAttribute
-
readIntAttribute
-
readOptionalIntAttribute
-
readIntAttribute
-
readBooleanAttribute
-
readBooleanAttribute
-
readOptionalBooleanAttribute
-
readContent
-
readIntArrayAttribute
-
readStringArrayAttribute
-
readChildNodes
-
readEndNode
public void readEndNode() -
close
public void close()
-