|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.ml.tigerxml.tools.DomTools
public class DomTools
Provides methods useful when utilizing the Document Object Model API as specified by the w3c. This class is for static use.
| Constructor Summary | |
|---|---|
DomTools()
|
|
| Method Summary | |
|---|---|
static void |
checkElementName(org.w3c.dom.Element ele,
java.lang.String name)
Checks if the name of ele is name. |
static org.w3c.dom.Element |
getElement(org.w3c.dom.Element ele,
java.lang.String name)
Returns the first element named name in
Element ele. |
static java.lang.String |
getText(org.w3c.dom.Element ele)
Returns the text embeded in ele. |
static boolean |
hasElement(org.w3c.dom.Element ele,
java.lang.String name)
Checks if the given Element has a child named
name. |
static void |
printNodeInfo(org.w3c.dom.Node node)
Prints information about a given node to stdout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DomTools()
| Method Detail |
|---|
public static final boolean hasElement(org.w3c.dom.Element ele,
java.lang.String name)
Element has a child named
name.
ele - The Element to be checked.name - The name of the child to be checked.
true if ele has a child name,
else false.
public static final org.w3c.dom.Element getElement(org.w3c.dom.Element ele,
java.lang.String name)
name in
Element ele.
ele - The Element holding the element to be retrieved.name - The name of the Element to be retrieved.
public static final void printNodeInfo(org.w3c.dom.Node node)
node - The node to print information about.
public static final void checkElementName(org.w3c.dom.Element ele,
java.lang.String name)
ele is name. If not,
a warning message is printed to stderr.
ele - The Element to be checked.name - The name of the Element to be checked against.public static final java.lang.String getText(org.w3c.dom.Element ele)
ele.
ele - The Element to be read out.
ele.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||