| java.lang.Object org.compass.core.util.DomUtils
DomUtils | abstract public class DomUtils (Code) | | Convenience methods for working with the DOM API,
in particular for working with DOM Nodes and DOM Elements.
author: kimchy See Also: org.w3c.dom.Node See Also: org.w3c.dom.Element |
getChildElementsByTagName | public static List getChildElementsByTagName(Element ele, String childEleName)(Code) | | Retrieve all child elements of the given DOM element that match
the given element name. Only look at the direct child level of the
given element; do not go into further depth (in contrast to the
DOM API's getElementsByTagName method).
Parameters: ele - the DOM element to analyze Parameters: childEleName - the child element name to look for a List of child org.w3c.dom.Element instances See Also: org.w3c.dom.Element See Also: org.w3c.dom.Element.getElementsByTagName |
getChildElementsByTagName | public static List getChildElementsByTagName(Element ele, String childEleName, boolean localName)(Code) | | Retrieve all child elements of the given DOM element that match
the given element name. Only look at the direct child level of the
given element; do not go into further depth (in contrast to the
DOM API's getElementsByTagName method).
Can select whether or not to compare against the local name of
the
org.w3c.dom.Element Parameters: ele - the DOM element to analyze Parameters: childEleName - the child element name to look for Parameters: localName - whether to compare against the local node name a List of child org.w3c.dom.Element instances See Also: org.w3c.dom.Element See Also: org.w3c.dom.Element.getElementsByTagName |
getElementAttribute | public static String getElementAttribute(Element ele, String attributeName, String defaultValue)(Code) | | Gets the attribute value from the element. If the attribute is null
or is an empty string, will return the defaultValue.
|
getElementAttributeAsBoolean | public static boolean getElementAttributeAsBoolean(Element ele, String attributeName, boolean defaultValue)(Code) | | |
|
|