public class Util
extends java.lang.Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getCDataValue(org.w3c.dom.Node node,
java.lang.String tag)
Returns the CDATA value of the subnode of specified node with the specified
tag.
|
static org.w3c.dom.Node |
getChildNode(org.w3c.dom.Node node,
java.lang.String tag)
Return the child node of the specified node with the specified tag.
|
static org.w3c.dom.Element |
getTopElementNode(org.w3c.dom.Document doc)
Returns the first element node of a document.
|
public static java.lang.String getCDataValue(org.w3c.dom.Node node, java.lang.String tag)
<test> <host>localhost<host> </test>would return localhost, for node being the
test
node and tag being host
.node
- The parent DOM nodetag
- The tag of the nodepublic static org.w3c.dom.Node getChildNode(org.w3c.dom.Node node, java.lang.String tag)
node
- The parent DOM nodetag
- The tag of the nodepublic static org.w3c.dom.Element getTopElementNode(org.w3c.dom.Document doc)
doc
- The DOM document.