public class XMLTools extends Object
Constructor and Description |
---|
XMLTools() |
Modifier and Type | Method and Description |
---|---|
static String |
format(Document doc) |
static String |
format(String xml) |
static String |
getAttributeValue(Node node,
String name) |
static boolean |
getAttributeValue(Node node,
String name,
boolean defaultValue) |
static float |
getAttributeValue(Node node,
String name,
float defaultValue) |
static int |
getAttributeValue(Node node,
String name,
int defaultValue) |
static String |
getAttributeValue(Node node,
String name,
String defaultValue) |
static String |
getAttributeValueOrThrowException(Node node,
String name,
String errMsg)
Returns the value of an attribute, and if the attribute is not found, throws an
ConfigurationException with the specified message.
|
static String |
getStringAttributeValue(Node node,
String name) |
static void |
setAttributeValue(Node node,
String name,
String value) |
public static boolean getAttributeValue(Node node, String name, boolean defaultValue)
node
- name
- defaultValue
- public static float getAttributeValue(Node node, String name, float defaultValue)
node
- name
- defaultValue
- public static int getAttributeValue(Node node, String name, int defaultValue)
node
- name
- defaultValue
- public static String getAttributeValue(Node node, String name, String defaultValue)
node
- name
- defaultValue
- public static String getAttributeValueOrThrowException(Node node, String name, String errMsg) throws ConfigurationException
ConfigurationException