Class NodeUtils
java.lang.Object
com.meterware.httpunit.NodeUtils
Some common utilities for manipulating DOM nodes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringConverts the DOM trees rooted at the specified nodes to text, ignoring any HTML tags.static intgetAttributeValue(Node node, String attributeName, int defaultValue) get the attribute with the given name from the given node as an int valuestatic StringgetNodeAttribute(Node node, String attributeName) get the attribute with the given name from the given nodestatic StringgetNodeAttribute(Node node, String attributeName, String defaultValue) get the attribute with the given name from the given nodestatic booleanisNodeAttributePresent(Node node, String attributeName) check whether the given Attribute in the Node is Present
-
Constructor Details
-
NodeUtils
public NodeUtils()
-
-
Method Details
-
getAttributeValue
get the attribute with the given name from the given node as an int value- Parameters:
node- - the node to look inattributeName- - the attribute's name to look fordefaultValue-- Returns:
- - the value - defaultValue as default
-
getNodeAttribute
-
getNodeAttribute
get the attribute with the given name from the given node- Parameters:
node- - the node to look inattributeName- - the attribute's name to look fordefaultValue-- Returns:
- - the value - defaultValue as default
-
isNodeAttributePresent
-
asText
-