public class XMLParseHelper
extends java.lang.Object
This class provides some static methods to help with XML parsing.
Modifier and Type | Method and Description |
---|---|
static java.lang.String | getAttribute(org.w3c.dom.Node aNode, java.lang.String attributeName)
This method will return the attribute value for an attribute inside of the provided XML node.
|
static java.lang.String | getAttribute(org.w3c.dom.Node aNode, java.lang.String attributeName, boolean encrypted)
This method will return the attribute value for an attribute inside of the provided XML node.
|
static void | populateAttributes(org.w3c.dom.Node aNode, java.util.Map aProperties)
This method will get all of the attributes for a given XML node, and populate the Map with the attribute name as the key and attribute value as the value.
|
static void | populateAttributes(org.w3c.dom.Node aNode, java.util.Map aProperties, boolean logAttributes)
This method will get all of the attributes for a given XML node, and populate the Map with the attribute name as the key and attribute value as the value.
|
static void | populateBusinessContextProperties(org.w3c.dom.Node businessContextNode, ConfigProperties configProperties)
This method adds business context properties to a Map of properties.
|
static void | populateBusinessContextProperties(org.w3c.dom.Node businessContextNode, java.util.Map propertyMap)
This method adds business context properties to a Map of properties.
|
static void | populateChildProperties(org.w3c.dom.Node aNode, java.util.Map aProperties)
This method searches XML nodes for child "property" or "contextProperty" nodes to populate in the Map as a set of properties.
|
static void | populateGroupPropertyMap(org.w3c.dom.Node aNode, ConfigProperties configProperties)
This method adds a group of properties to a Map of properties.
|
static void | populateProperties(org.w3c.dom.Node aNode, java.util.Map aProperties)
This method will parse property nodes in the form of name-value pairs and add them to the Map of properties.
|
static java.lang.String | resolveVariables(java.lang.String aString)
Resolve the variable.
|
public static void populateChildProperties(org.w3c.dom.Node aNode, java.util.Map aProperties)
This method searches XML nodes for child "property" or "contextProperty" nodes to populate in the Map as a set of properties. The key of the output map (aProperties) is the name attribute of a child of the node.
The value can be 1. A string if the name of child node is "property". 2. A ContextDataProperties object if the name of child node is "contextData".
public static void populateProperties(org.w3c.dom.Node aNode, java.util.Map aProperties)
This method will parse property nodes in the form of name-value pairs and add them to the Map of properties.
The key of the Map is the property name, the value in the Map is the property value.
public static void populateAttributes(org.w3c.dom.Node aNode, java.util.Map aProperties)
This method will get all of the attributes for a given XML node, and populate the Map with the attribute name as the key and attribute value as the value.
The attribute name and value will be logged to the level Level.FINEST
public static void populateAttributes(org.w3c.dom.Node aNode, java.util.Map aProperties, boolean logAttributes)
This method will get all of the attributes for a given XML node, and populate the Map with the attribute name as the key and attribute value as the value.
The attribute name and value will be logged to the level Level.FINEST if logAttributes is true, and not if it is false.
public static java.lang.String resolveVariables(java.lang.String aString)
public static java.lang.String getAttribute(org.w3c.dom.Node aNode, java.lang.String attributeName, boolean encrypted)
This method will return the attribute value for an attribute inside of the provided XML node.
public static java.lang.String getAttribute(org.w3c.dom.Node aNode, java.lang.String attributeName)
This method will return the attribute value for an attribute inside of the provided XML node.
public static void populateGroupPropertyMap(org.w3c.dom.Node aNode, ConfigProperties configProperties)
This method adds a group of properties to a Map of properties.
public static void populateBusinessContextProperties(org.w3c.dom.Node businessContextNode, ConfigProperties configProperties)
This method adds business context properties to a Map of properties.
public static void populateBusinessContextProperties(org.w3c.dom.Node businessContextNode, java.util.Map propertyMap)
This method adds business context properties to a Map of properties.