Package com.powsybl.commons.xml
Class XmlWriter
java.lang.Object
com.powsybl.commons.xml.XmlWriter
- All Implemented Interfaces:
TreeDataWriter
,AutoCloseable
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
setExtensionNamespace
(String extensionName, String namespaceUri, String namespacePrefix) void
setVersions
(Map<String, String> versions) void
writeBooleanAttribute
(String name, boolean value) void
writeBooleanAttribute
(String name, boolean value, boolean absentValue) void
writeDoubleAttribute
(String name, double value) void
writeDoubleAttribute
(String name, double value, double absentValue) void
void
<E extends Enum<E>>
voidwriteEnumAttribute
(String name, E value) void
writeFloatAttribute
(String name, float value) void
writeIntArrayAttribute
(String name, Collection<Integer> values) void
writeIntAttribute
(String name, int value) void
writeIntAttribute
(String name, int value, int absentValue) void
writeNamespace
(String prefix, String namespace) void
writeNodeContent
(String value) void
writeStartNode
(String namespace, String name) void
void
writeStringArrayAttribute
(String name, Collection<String> values) void
writeStringAttribute
(String name, String value)
-
Constructor Details
-
XmlWriter
public XmlWriter(OutputStream os, String indent, Charset charset, String rootNamespaceURI, String rootPrefix) throws XMLStreamException - Throws:
XMLStreamException
-
-
Method Details
-
writeStartNodes
public void writeStartNodes()- Specified by:
writeStartNodes
in interfaceTreeDataWriter
-
writeEndNodes
public void writeEndNodes()- Specified by:
writeEndNodes
in interfaceTreeDataWriter
-
writeStartNode
- Specified by:
writeStartNode
in interfaceTreeDataWriter
-
writeEndNode
public void writeEndNode()- Specified by:
writeEndNode
in interfaceTreeDataWriter
-
writeNamespace
- Specified by:
writeNamespace
in interfaceTreeDataWriter
-
writeNodeContent
- Specified by:
writeNodeContent
in interfaceTreeDataWriter
-
writeStringAttribute
- Specified by:
writeStringAttribute
in interfaceTreeDataWriter
-
writeFloatAttribute
- Specified by:
writeFloatAttribute
in interfaceTreeDataWriter
-
writeDoubleAttribute
- Specified by:
writeDoubleAttribute
in interfaceTreeDataWriter
-
writeDoubleAttribute
- Specified by:
writeDoubleAttribute
in interfaceTreeDataWriter
-
writeIntAttribute
- Specified by:
writeIntAttribute
in interfaceTreeDataWriter
-
writeIntAttribute
- Specified by:
writeIntAttribute
in interfaceTreeDataWriter
-
writeIntArrayAttribute
- Specified by:
writeIntArrayAttribute
in interfaceTreeDataWriter
-
writeStringArrayAttribute
- Specified by:
writeStringArrayAttribute
in interfaceTreeDataWriter
-
writeEnumAttribute
- Specified by:
writeEnumAttribute
in interfaceTreeDataWriter
-
writeBooleanAttribute
- Specified by:
writeBooleanAttribute
in interfaceTreeDataWriter
-
writeBooleanAttribute
- Specified by:
writeBooleanAttribute
in interfaceTreeDataWriter
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceTreeDataWriter
-
setVersions
- Specified by:
setVersions
in interfaceTreeDataWriter
-
setExtensionNamespace
-