- java.lang.Object
-
- org.arakhne.afc.attrs.xml.XMLAttributeUtil
-
public final class XMLAttributeUtil extends Object
This class provides XML utilities related to attributes.- Since:
- 15.0
- Version:
- 17.0 2020-01-04 14:41:51
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- attributes
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_GEOID
geoid=""
.static String
ATTR_TYPE
type=""
.static String
ATTR_VALUE
value=""
.static String
NODE_ATTRIBUTE
<attribute />
.static String
NODE_ATTRIBUTES
<attributes />
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
readAttributeContainer(Element element, AttributeCollection container, PathBuilder pathBuilder, XMLResources resources, boolean readStandardAttribute)
Put the attributes in the given container from the given XML element.static void
writeAttributeContainer(Element element, AttributeProvider container, XMLBuilder builder, XMLResources resources, boolean writeStandardAttribute)
Put in the given XML element the attributes stored in the given container.
-
-
-
Field Detail
-
NODE_ATTRIBUTE
public static final String NODE_ATTRIBUTE
<attribute />
.- See Also:
- Constant Field Values
-
NODE_ATTRIBUTES
public static final String NODE_ATTRIBUTES
<attributes />
.- See Also:
- Constant Field Values
-
ATTR_GEOID
public static final String ATTR_GEOID
geoid=""
.- See Also:
- Constant Field Values
-
ATTR_TYPE
public static final String ATTR_TYPE
type=""
.- See Also:
- Constant Field Values
-
ATTR_VALUE
public static final String ATTR_VALUE
value=""
.- See Also:
- Constant Field Values
-
-
Method Detail
-
writeAttributeContainer
public static void writeAttributeContainer(Element element, AttributeProvider container, XMLBuilder builder, XMLResources resources, boolean writeStandardAttribute)
Put in the given XML element the attributes stored in the given container. This function ignores the attributes with the names "id", "name", "color", "icon", and "geoId" if the parameter writeStandardAttribute isfalse
.- Parameters:
element
- is the XML element to fill.container
- is the container of attributes.builder
- is the tool to create XML nodes.resources
- is the tool that permits to gather the resources.writeStandardAttribute
- indicates if the attributes "id", "name", "color", and "geoId" should be write or not.
-
readAttributeContainer
public static void readAttributeContainer(Element element, AttributeCollection container, PathBuilder pathBuilder, XMLResources resources, boolean readStandardAttribute) throws IOException
Put the attributes in the given container from the given XML element. This function ignores the attributes with the names "id", "name", "color", and "geoId" if the parameter readStandardAttribute isfalse
.- Parameters:
element
- is the XML element to fill.container
- is the container of attributes.pathBuilder
- is the tool to make paths absolute.resources
- is the tool that permits to gather the resources.readStandardAttribute
- indicates if the attributes "id", "name", "color", and "geoId" should be write or not.- Throws:
IOException
- in case of error.
-
-