com.atlassian.renderer.util
Class NodeUtil
java.lang.Object
com.atlassian.renderer.util.NodeUtil
public class NodeUtil
- extends java.lang.Object
Utility methods for nodes.
|
Method Summary |
static boolean |
attributeContains(org.w3c.dom.Node node,
java.lang.String name,
java.lang.String value)
Returns true if the named attribute exists and contains the passed in value. |
static java.lang.String |
getAttribute(org.w3c.dom.Node node,
java.lang.String name)
|
static boolean |
getBooleanAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName,
boolean defaultValue)
Retrieve the value of an attribute for a node as a boolean. |
static boolean |
isList(org.w3c.dom.Node node)
|
static boolean |
isTextNode(org.w3c.dom.Node node)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeUtil
public NodeUtil()
getAttribute
public static java.lang.String getAttribute(org.w3c.dom.Node node,
java.lang.String name)
getBooleanAttributeValue
public static boolean getBooleanAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName,
boolean defaultValue)
- Retrieve the value of an attribute for a node as a boolean. If the value is not
present, or not readily convertible to a boolean return the requested defaultValue.
- Parameters:
node - from which to retrieve the valueattributeName - the attribute to find the value ofdefaultValue - the value to return if no boolean value is found.
- Returns:
- the value of an attribute
attributeContains
public static boolean attributeContains(org.w3c.dom.Node node,
java.lang.String name,
java.lang.String value)
- Returns true if the named attribute exists and contains the passed in value.
isTextNode
public static boolean isTextNode(org.w3c.dom.Node node)
isList
public static boolean isList(org.w3c.dom.Node node)
Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.