public class AttributesUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
XML_TAG |
static String |
XML_TAG_ATTRIBUTE |
static String |
XML_TAG_GROUP |
Constructor and Description |
---|
AttributesUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getAttributesXml(Map<String,Map<String,String>> attributesMap)
Serialize an attributes group map to XML.
|
static String |
getAttributesXml(Map<String,Map<String,String>> attributesMap,
String xmlTag)
Serialize an attributes group map to XML.
|
static Map<String,Map<String,String>> |
loadAttributes(Node attributesNode)
Load the attribute groups from an XML DOM Node.
|
public static final String XML_TAG
public static final String XML_TAG_GROUP
public static final String XML_TAG_ATTRIBUTE
public static String getAttributesXml(Map<String,Map<String,String>> attributesMap)
Serialize an attributes group map to XML.
The information will be encapsulated in the default tag: XML_TAG
.
If a null or empty Map is given, the generated XML will have the default tag (with no content).
Equivalent to:
getAttributesXml( attributesMap, AttributesUtil.XML_TAG )
attributesMap
- the attribute groups to serializegetAttributesXml(Map, String)
public static String getAttributesXml(Map<String,Map<String,String>> attributesMap, String xmlTag)
Serialize an attributes group map to XML.
The information will be encapsulated in the specified tag.
If a null or empty Map is given, the generated XML will have the provided tag (with no content).
attributesMap
- the attribute groups to serializexmlTag
- the xml tag to use for the generated xmlgetAttributesXml(Map)
public static Map<String,Map<String,String>> loadAttributes(Node attributesNode)
Load the attribute groups from an XML DOM Node.
An empty Map will be returned if a null or empty Node is given.
attributesNode
- the attributes node to read fromCopyright © 2018 Hitachi Vantara. All rights reserved.