@Deprecated public class DomUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DomUtil.NullResolver
Deprecated.
|
Constructor and Description |
---|
DomUtil()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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 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 Document readXml(InputStream is) throws SAXException, IOException, ParserConfigurationException
public static void writeXml(Node n, OutputStream os) throws TransformerException
TransformerException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.