| java.lang.Object nextapp.echo2.app.util.DomUtil
DomUtil | public class DomUtil (Code) | | A utility class which provides methods for working with a W3C DOM.
|
Method Summary | |
public static boolean | getBooleanAttribute(Element element, String attributeName) Determines whether a specific boolean flag is set on an element.
Parameters: element - The element to analyze. Parameters: attributeName - The name of the boolean 'flag' attribute. | public static Element | getChildElementByTagName(Element parentElement, String name) Retrieves the first immediate child element of the specified element
whose name matches the provided name parameter.
Parameters: parentElement - The element to search. Parameters: name - The name of the child element. | public static Element | getChildElementByTagNameNS(Element parentElement, String namespaceURI, String localName) Retrieves the first immediate child element of the specified element
whose name matches the provided name parameter.
Parameters: parentElement - The element to search. Parameters: namespaceURI - The namespace URI of the child element. Parameters: localName - The name of the child element. | public static int | getChildElementCountByTagName(Element parentElement, String name) Counts the number of immediate child elements of the specified element
whose names match the provided name parameter.
Parameters: parentElement - The element to analyze. Parameters: name - The name of the child element. | public static int | getChildElementCountByTagNameNS(Element parentElement, String namespaceURI, String localName) Counts the number of immediate child elements of the specified element
whose names match the provided name parameter.
Parameters: parentElement - The element to analyze. Parameters: namespaceURI - The namespace URI of the child element. Parameters: localName - The name of the child element. | public static Element[] | getChildElementsByTagName(Element parentElement, String name) Retrieves all immediate child elements of the specified element whose
names match the provided name parameter.
Parameters: parentElement - The element to search. Parameters: name - The name of the child element. | public static Element[] | getChildElementsByTagNameNS(Element parentElement, String namespaceURI, String localName) Retrieves all immediate child elements of the specified element whose
names match the provided name parameter.
Parameters: parentElement - The element to search. Parameters: namespaceURI - The namespace URI of the child element. Parameters: localName - The name of the child element. | public static String | getElementText(Element element) Returns the text content of a DOM Element . | public static void | setElementText(Element element, String value) Sets the text content of a DOM Element . |
getBooleanAttribute | public static boolean getBooleanAttribute(Element element, String attributeName)(Code) | | Determines whether a specific boolean flag is set on an element.
Parameters: element - The element to analyze. Parameters: attributeName - The name of the boolean 'flag' attribute. True if the value of the attribute is 'true', false if it isnot or if the attribute does not exist. |
getChildElementByTagName | public static Element getChildElementByTagName(Element parentElement, String name)(Code) | | Retrieves the first immediate child element of the specified element
whose name matches the provided name parameter.
Parameters: parentElement - The element to search. Parameters: name - The name of the child element. The child element, or null if none was found. |
getChildElementByTagNameNS | public static Element getChildElementByTagNameNS(Element parentElement, String namespaceURI, String localName)(Code) | | Retrieves the first immediate child element of the specified element
whose name matches the provided name parameter.
Parameters: parentElement - The element to search. Parameters: namespaceURI - The namespace URI of the child element. Parameters: localName - The name of the child element. The child element, or null if none was found. |
getChildElementCountByTagName | public static int getChildElementCountByTagName(Element parentElement, String name)(Code) | | Counts the number of immediate child elements of the specified element
whose names match the provided name parameter.
Parameters: parentElement - The element to analyze. Parameters: name - The name of the child element. The number of matching child elements. |
getChildElementCountByTagNameNS | public static int getChildElementCountByTagNameNS(Element parentElement, String namespaceURI, String localName)(Code) | | Counts the number of immediate child elements of the specified element
whose names match the provided name parameter.
Parameters: parentElement - The element to analyze. Parameters: namespaceURI - The namespace URI of the child element. Parameters: localName - The name of the child element. The number of matching child elements. |
getChildElementsByTagName | public static Element[] getChildElementsByTagName(Element parentElement, String name)(Code) | | Retrieves all immediate child elements of the specified element whose
names match the provided name parameter.
Parameters: parentElement - The element to search. Parameters: name - The name of the child element. An array of matching child elements. |
getChildElementsByTagNameNS | public static Element[] getChildElementsByTagNameNS(Element parentElement, String namespaceURI, String localName)(Code) | | Retrieves all immediate child elements of the specified element whose
names match the provided name parameter.
Parameters: parentElement - The element to search. Parameters: namespaceURI - The namespace URI of the child element. Parameters: localName - The name of the child element. An array of matching child elements. |
getElementText | public static String getElementText(Element element)(Code) | | Returns the text content of a DOM Element .
Parameters: element - The Element to analyze. |
setElementText | public static void setElementText(Element element, String value)(Code) | | Sets the text content of a DOM Element .
Parameters: element - The Element to modify. Parameters: value - The new text value. |
|
|