|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.xml.XmlUtil
public class XmlUtil
XML utilities for manipulating names and the DOM.
Constructor Summary | |
---|---|
XmlUtil()
|
Method Summary | |
---|---|
static java.lang.String |
getNamespace(org.w3c.dom.Node node,
java.lang.String prefix)
Returns the namespace for the given prefix. |
static org.w3c.dom.Node |
getNext(org.w3c.dom.Node node)
Get the next node in a depth first preorder traversal. |
static java.lang.String |
getPIAttribute(java.lang.String pi,
java.lang.String key)
Extracts an attribute from a processing instruction. |
static org.w3c.dom.Node |
getPrevious(org.w3c.dom.Node node)
Get the previous node in a DFS preorder traversal |
static boolean |
isWhitespace(java.lang.String text)
Extracts the text value from the node. |
static java.util.HashMap<java.lang.String,java.lang.String> |
splitNameList(java.lang.String name)
Treats the string as an attribute list, splitting it into a HashMap. |
static void |
textValue(CharBuffer cb,
org.w3c.dom.Node node)
Extracts the text value from the node. |
static java.lang.String |
textValue(org.w3c.dom.Node node)
Extracts the text value from the node. |
static void |
toSAX(org.w3c.dom.Node node,
org.xml.sax.ContentHandler handler)
Sends data to the helper. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlUtil()
Method Detail |
---|
public static java.util.HashMap<java.lang.String,java.lang.String> splitNameList(java.lang.String name) throws java.io.IOException
name
- a string to be interpreted as an attribute list
java.io.IOException
public static java.lang.String getPIAttribute(java.lang.String pi, java.lang.String key)
<?xml-stylesheet href="default.xsl"?>
In the above example,
would return "default.xsl".
getPIAttribute(node.getNodeValue(), "href")
pi
- the value of the processing instructionkey
- the attribute key
public static org.w3c.dom.Node getNext(org.w3c.dom.Node node)
node
- the current node
public static org.w3c.dom.Node getPrevious(org.w3c.dom.Node node)
node
- the current node
public static java.lang.String textValue(org.w3c.dom.Node node)
public static void textValue(CharBuffer cb, org.w3c.dom.Node node)
public static boolean isWhitespace(java.lang.String text)
public static void toSAX(org.w3c.dom.Node node, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public static java.lang.String getNamespace(org.w3c.dom.Node node, java.lang.String prefix)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |