|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.barracuda.core.util.dom.DOMUtil
DOM related utility functions.
Constructor Summary | |
DOMUtil()
|
Method Summary | |
static org.w3c.dom.Text |
findFirstText(org.w3c.dom.Node node)
Find the first text descendent node of an element. |
static org.w3c.dom.Text |
getFirstText(org.w3c.dom.Node node)
Gets the first text descendent node of an element. |
static java.lang.String |
getID(org.w3c.dom.Node node)
Given a Node name, return the "id" attribute if it exists. |
static java.lang.String |
getID(org.w3c.dom.Node node,
java.lang.String nullResponse)
Given a Node name, return the "id" attribute if it exists. |
protected static void |
print(java.io.OutputStream out,
java.lang.String s)
|
static void |
printStackTrace(org.w3c.dom.Node node)
utility method to recursively print the stack trace for a DOM Node |
static void |
printStackTrace(org.w3c.dom.Node node,
int depth,
java.io.OutputStream out)
utility method to recursively print the stack trace for a DOM Node Bounds: If depth < 0, the method returns immediately |
static void |
removeAllTextNodes(org.w3c.dom.Node node)
Remove all text nodes below this node |
static org.w3c.dom.Node |
setTextInNode(org.w3c.dom.Node node,
java.lang.String text,
boolean allowMarkupInText)
Automatically set text in a Node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DOMUtil()
Method Detail |
public static org.w3c.dom.Text findFirstText(org.w3c.dom.Node node)
node
- The starting node for the search.
public static org.w3c.dom.Text getFirstText(org.w3c.dom.Node node)
node
- The starting node for the search.
org.w3c.dom.DOMException
- if the Text object is not foundpublic static org.w3c.dom.Node setTextInNode(org.w3c.dom.Node node, java.lang.String text, boolean allowMarkupInText)
node
- the starting node for the search.
org.w3c.dom.DOMException
- if the Text object is not foundpublic static void removeAllTextNodes(org.w3c.dom.Node node)
node
- The starting node for the search.public static java.lang.String getID(org.w3c.dom.Node node)
node
- the node name in question
public static java.lang.String getID(org.w3c.dom.Node node, java.lang.String nullResponse)
node
- the node name in questionnullResponse
- the response to be returned if the id attribute
does not exist
public static void printStackTrace(org.w3c.dom.Node node)
utility method to recursively print the stack trace for a DOM Node
public static void printStackTrace(org.w3c.dom.Node node, int depth, java.io.OutputStream out)
utility method to recursively print the stack trace for a DOM Node
Bounds:
If depth < 0, the method returns immediately
out
- OutputStream to print toprotected static void print(java.io.OutputStream out, java.lang.String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |