|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ca.intelliware.amakihi.util.xml.DOMUtils
Provides simple utilities for Document Object Model (DOM) manipulation.
Constructor Summary | |
DOMUtils()
|
Method Summary | |
static boolean |
elementHasSubElements(org.w3c.dom.Element element)
|
static org.w3c.dom.Element |
getFirstElementByLocalName(org.w3c.dom.Element parent,
java.lang.String tagName)
Find the first child element by local name. |
static org.w3c.dom.Element |
getFirstElementByTagNameNS(org.w3c.dom.Element parent,
java.lang.String namespace,
java.lang.String tagName)
Find the first child element by namespace and tag name. |
static java.lang.String |
getTextValue(org.w3c.dom.Node node)
Scan all immediate children of a node, and append all text nodes into a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DOMUtils()
Method Detail |
public static org.w3c.dom.Element getFirstElementByTagNameNS(org.w3c.dom.Element parent, java.lang.String namespace, java.lang.String tagName)
Find the first child element by namespace and tag name.
parent
- - the node whose children are being scanned for a matchnamespace
- - the namespace of the elementtagName
- - the local name of the elementpublic static org.w3c.dom.Element getFirstElementByLocalName(org.w3c.dom.Element parent, java.lang.String tagName)
Find the first child element by local name.
parent
- - the node whose children are being scanned for a matchtagName
- - the local name of the elementpublic static java.lang.String getTextValue(org.w3c.dom.Node node)
Scan all immediate children of a node, and append all text nodes into a string. Consider the following example:
<customer>Joe Schmoe</customer>
In this case, calling this method on the
customer
element returns "Joe Schmoe".
public static boolean elementHasSubElements(org.w3c.dom.Element element)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |