public class NodeUtils
extends java.lang.Object
| Constructor and Description |
|---|
NodeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
asText(org.w3c.dom.NodeList rootNodes)
Converts the DOM trees rooted at the specified nodes to text, ignoring
any HTML tags.
|
static int |
getAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName,
int defaultValue)
get the attribute with the given name from the given node as an int value
|
static java.lang.String |
getNodeAttribute(org.w3c.dom.Node node,
java.lang.String attributeName)
get the attribute with the given name from the given node
|
static java.lang.String |
getNodeAttribute(org.w3c.dom.Node node,
java.lang.String attributeName,
java.lang.String defaultValue)
get the attribute with the given name from the given node
|
static boolean |
isNodeAttributePresent(org.w3c.dom.Node node,
java.lang.String attributeName)
check whether the given Attribute in the Node is Present
|
public static int getAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName,
int defaultValue)
node - - the node to look inattributeName - - the attribute's name to look fordefaultValue - public static java.lang.String getNodeAttribute(org.w3c.dom.Node node,
java.lang.String attributeName)
node - - the node to look inattributeName - - the attribute's name to look forpublic static java.lang.String getNodeAttribute(org.w3c.dom.Node node,
java.lang.String attributeName,
java.lang.String defaultValue)
node - - the node to look inattributeName - - the attribute's name to look fordefaultValue - public static boolean isNodeAttributePresent(org.w3c.dom.Node node,
java.lang.String attributeName)
node - - the node to checkattributeName - - the attribute name to checkpublic static java.lang.String asText(org.w3c.dom.NodeList rootNodes)