|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.DomUtil
@Deprecated public class DomUtil
Few simple utils to read DOM
Nested Class Summary | |
---|---|
static class |
DomUtil.NullResolver
Deprecated. |
Constructor Summary | |
---|---|
DomUtil()
Deprecated. |
Method Summary | |
---|---|
static Node |
findChildWithAtt(Node parent,
String elemName,
String attName,
String attVal)
Deprecated. Find the first direct child with a given attribute. |
static String |
getAttribute(Node element,
String attName)
Deprecated. |
static Node |
getChild(Node parent,
int type)
Deprecated. Get the first direct child with a given type |
static Node |
getChild(Node parent,
String name)
Deprecated. Get the first element child. |
static String |
getChildContent(Node parent,
String name)
Deprecated. Get the first child's content ( ie it's included TEXT node ). |
static String |
getContent(Node n)
Deprecated. Get the trimmed text content of a node or null if there is no text |
static Node |
getNext(Node current)
Deprecated. Get the next sibling with the same name and type |
static Node |
getNext(Node current,
String name,
int type)
Deprecated. Return the next sibling with a given name and type |
static Document |
readXml(InputStream is)
Deprecated. Read XML as DOM. |
static void |
removeAttribute(Node node,
String attName)
Deprecated. |
static void |
setAttribute(Node node,
String attName,
String val)
Deprecated. |
static void |
setAttributes(Object o,
Node parent)
Deprecated. |
static void |
setText(Node node,
String val)
Deprecated. Set or replace the text value |
static void |
writeXml(Node n,
OutputStream os)
Deprecated. |
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 String getContent(Node n)
public static Node getChild(Node parent, String name)
parent
- lookup direct childrenname
- name of the element. If null return the first element.public static String getAttribute(Node element, String attName)
public static void setAttribute(Node node, String attName, String val)
public static void removeAttribute(Node node, String attName)
public static void setText(Node node, String val)
public static Node findChildWithAtt(Node parent, String elemName, String attName, String attVal)
parent
- elemName
- name of the element, or null for anyattName
- attribute we're looking forattVal
- attribute value or null if we just want anypublic static String getChildContent(Node parent, String name)
public static Node getChild(Node parent, int type)
public static Node getNext(Node current)
public static Node getNext(Node current, String name, int type)
public static void setAttributes(Object o, Node parent)
public static Document readXml(InputStream is) throws SAXException, IOException, ParserConfigurationException
SAXException
IOException
ParserConfigurationException
public static void writeXml(Node n, OutputStream os) throws TransformerException
TransformerException
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |