|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.xmlc.XMLCUtil
Utility methods for dealing with DOMs.
Field Summary | |
static int |
PRINT_ALL
Deprecated. Use DOMInfo |
static int |
PRINT_CDATA
Deprecated. Use DOMInfo |
static int |
PRINT_COMMENT
Deprecated. Use DOMInfo |
static int |
PRINT_DEFAULT
Deprecated. Use DOMInfo |
static int |
PRINT_DOCUMENTTYPE
Deprecated. Use DOMInfo |
static int |
PRINT_TEXT
Deprecated. Use DOMInfo |
Constructor Summary | |
XMLCUtil()
|
Method Summary | |
static Node |
copyNode(Node srcNode,
Document destDocument)
Deprecated. use org.w3c.dom.Document.importNode |
static Text |
findFirstText(Node node)
Find the first text descendent node of an element. |
static Attr |
getAttributeByName(Node node,
String name)
Deprecated. use org.w3c.dom.Element#getAttributeNode |
static Element |
getElementById(String id,
Node node)
Recursively search for an element by id starting at a node. |
static Text |
getFirstText(Node node)
Find the first text descendent node of an element. |
static Element |
getRequiredElementById(String id,
Node node)
Recursively search for an required element by id starting at a node. |
static void |
printNode(String msg,
Node node,
int options,
PrintWriter out)
Deprecated. Use DOMInfo |
static void |
printNode(String msg,
Node node,
OutputStream out)
Deprecated. Use DOMInfo |
static void |
printNode(String msg,
Node node,
PrintWriter out)
Deprecated. Use DOMInfo |
static Node |
replaceNode(Node srcNode,
Node destNode)
Deprecated. use org.enhydra.xml.dom.DOMOps#replaceNode |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int PRINT_COMMENT
DOMInfo.printTree(java.lang.String, org.w3c.dom.Node, int, java.io.PrintWriter)
public static final int PRINT_TEXT
DOMInfo.printTree(java.lang.String, org.w3c.dom.Node, int, java.io.PrintWriter)
public static final int PRINT_CDATA
Option to printNode to print the contents of Text nodes.
public static final int PRINT_DOCUMENTTYPE
Option to printNode to print the contents of DocumentType nodes.
public static final int PRINT_ALL
All Print options.
public static final int PRINT_DEFAULT
Default print options.
Constructor Detail |
public XMLCUtil()
Method Detail |
public static Attr getAttributeByName(Node node, String name)
node
- Node who's attribute is desired.name
- The name of the desired attribute.Element.getAttributeNode(java.lang.String)
public static Text findFirstText(Node node)
node
- The starting node for the search.public static Text getFirstText(Node node)
node
- The starting node for the search.XMLCError
- If a text node was not found.public static Element getElementById(String id, Node node)
id
- The element id to find. Case is ignored.node
- The node to start the search at.public static Element getRequiredElementById(String id, Node node)
id
- The element id to find. Case is ignored.node
- The node to start the search at.XMLCError
- Thrown if the element is not found.getElementById(java.lang.String, org.w3c.dom.Node)
public static Node copyNode(Node srcNode, Document destDocument)
srcNode
- The node to copy.destDocument
- The destination document. The node will
belong to this document but will not be inserted in it.Document.importNode(org.w3c.dom.Node, boolean)
public static Node replaceNode(Node srcNode, Node destNode)
srcElement
- The node to clone and insertdestElement
- The node to be replacedDOMOps.replaceNode(org.w3c.dom.Node, org.w3c.dom.Node)
public static void printNode(String msg, Node node, int options, PrintWriter out)
DOMInfo.printTree(java.lang.String, org.w3c.dom.Node, int, java.io.PrintWriter)
public static void printNode(String msg, Node node, PrintWriter out)
DOMInfo.printTree(java.lang.String, org.w3c.dom.Node, int, java.io.PrintWriter)
public static void printNode(String msg, Node node, OutputStream out)
DOMInfo.printTree(java.lang.String, org.w3c.dom.Node, int, java.io.PrintWriter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |