@Deprecated public final class DOMUtil extends Object
Modifier and Type | Field and Description |
---|---|
static DocumentBuilderFactory |
DOC_FACT
Deprecated.
Factory for generating document builders.
|
static SAXParserFactory |
SAX_FACT
Deprecated.
Factory for generating SAX parsers.
|
static TransformerFactory |
TRANS_FACT
Deprecated.
Factory for generating transformers.
|
Modifier and Type | Method and Description |
---|---|
static Element |
createChild(Element el,
String name)
Deprecated.
Creates a child element with the given name beneath the specified element.
|
static Element |
createChild(Element el,
String name,
boolean attach)
Deprecated.
Creates an element with the given name in the specified element's DOM,
inserting it into the tree structure as a child of that element
if the attach flag is set.
|
static Element |
findElement(String name,
Document doc)
Deprecated.
Finds the first (breadth first) DOM element with the specified name.
|
static Element |
findElement(String name,
String attrName,
String attrValue,
Document doc)
Deprecated.
Finds the first (breadth first) DOM element with the specified
name that has an attribute with the given name and value.
|
static Vector |
findElementList(String name,
Document doc)
Deprecated.
Gets a list of DOM elements with the specified name throughout
the document (not just children of a specific element).
|
static Vector |
findElementList(String name,
String attrName,
String attrValue,
Document doc)
Deprecated.
Gets a list of DOM elements with the specified name
that have an attribute with the given name and value.
|
static Element |
getAncestorElement(String name,
Element el)
Deprecated.
Gets the given element's first ancestor DOM element
with the specified name.
|
static String |
getAttribute(String name,
Element el)
Deprecated.
Gets the value of the given DOM element's attribute
with the specified name.
|
static String[] |
getAttributeNames(Element el)
Deprecated.
Gets a list of all attribute names for the given DOM element.
|
static String[] |
getAttributeValues(Element el)
Deprecated.
Gets a list of all attribute values for the given DOM element.
|
static Boolean |
getBooleanAttribute(String name,
Element el)
Deprecated.
Gets the value of the DOM element's attribute with the given name
as a Boolean, or null if the value is not a boolean.
|
static Boolean |
getBooleanCharacterData(Element el)
Deprecated.
Gets the character data corresponding to the given DOM element as
a Boolean, or null if the value is not a boolean.
|
static String |
getCharacterData(Element el)
Deprecated.
Gets the character data corresponding to the given DOM element.
|
static Element |
getChildElement(String name,
Element el)
Deprecated.
Gets the given element's first child DOM element with the specified name.
|
static Element |
getChildElement(String name,
Element el,
int index)
Deprecated.
Gets the given element's index-th child DOM element with the specified
name, or the index-th child element overall if name is null.
|
static Vector |
getChildElements(Element el)
Deprecated.
Gets a list of the given element's child DOM elements.
|
static Vector |
getChildElements(String name,
Element el)
Deprecated.
Gets a list of the given element's child DOM elements
with the specified name, or all child elements if name is null.
|
static Text |
getChildTextNode(Element el)
Deprecated.
Gets the child text node containing character data
for the given DOM element.
|
static Double |
getDoubleAttribute(String name,
Element el)
Deprecated.
Gets the value of the DOM element's attribute with the given name
as a Double, or null if the value is not a double.
|
static Double |
getDoubleCharacterData(Element el)
Deprecated.
Gets the character data corresponding to the given DOM element as
a Double, or null if the value is not a double.
|
static Float |
getFloatAttribute(String name,
Element el)
Deprecated.
Gets the value of the DOM element's attribute with the given name
as a Float, or null if the value is not a float.
|
static Float |
getFloatCharacterData(Element el)
Deprecated.
Gets the character data corresponding to the given DOM element as
a Float, or null if the value is not a float.
|
static Integer |
getIntegerAttribute(String name,
Element el)
Deprecated.
Gets the value of the DOM element's attribute with the given name
as an Integer, or null if the value is not an integer.
|
static Integer |
getIntegerCharacterData(Element el)
Deprecated.
Gets the character data corresponding to the given DOM element as
a Integer, or null if the value is not a integer.
|
static Long |
getLongAttribute(String name,
Element el)
Deprecated.
Gets the value of the DOM element's attribute with the given name
as a Long, or null if the value is not a long.
|
static Long |
getLongCharacterData(Element el)
Deprecated.
Gets the character data corresponding to the given DOM element as
a Long, or null if the value is not a long.
|
static String |
getName(Node node)
Deprecated.
Gets the local (sans namespace) name of the given node.
|
static String |
getNamespace(Node node)
Deprecated.
Gets the namespace of the given node.
|
static void |
setAttribute(String name,
Object value,
Element el)
Deprecated.
Sets the value of the given DOM element's attribute with the
specified name to the given value's string representation.
|
static void |
setAttribute(String name,
String value,
Element el)
Deprecated.
Sets the value of the given DOM element's attribute
with the specified name to the given value.
|
static void |
setCharacterData(Object data,
Element el)
Deprecated.
Sets the character data corresponding to the given DOM element
to the specified Object's string representation.
|
static void |
setCharacterData(String data,
Element el)
Deprecated.
Sets the character data corresponding to the given DOM element.
|
static void |
writeXML(OutputStream os,
Document doc)
Deprecated.
Writes the specified DOM to the given output stream.
|
public static final TransformerFactory TRANS_FACT
public static final DocumentBuilderFactory DOC_FACT
public static final SAXParserFactory SAX_FACT
public static void writeXML(OutputStream os, Document doc) throws TransformerException
TransformerException
public static String getName(Node node)
public static String getNamespace(Node node)
public static String getCharacterData(Element el)
public static void setCharacterData(String data, Element el)
public static void setCharacterData(Object data, Element el)
public static Boolean getBooleanCharacterData(Element el)
public static Double getDoubleCharacterData(Element el)
public static Float getFloatCharacterData(Element el)
public static Integer getIntegerCharacterData(Element el)
public static Long getLongCharacterData(Element el)
public static Text getChildTextNode(Element el)
public static Element getChildElement(String name, Element el)
public static Vector getChildElements(Element el)
public static Vector getChildElements(String name, Element el)
public static Element getChildElement(String name, Element el, int index)
public static Element getAncestorElement(String name, Element el)
public static Element findElement(String name, Document doc)
public static Element findElement(String name, String attrName, String attrValue, Document doc)
public static Vector findElementList(String name, Document doc)
public static Vector findElementList(String name, String attrName, String attrValue, Document doc)
public static Element createChild(Element el, String name)
public static Element createChild(Element el, String name, boolean attach)
public static String[] getAttributeNames(Element el)
public static String[] getAttributeValues(Element el)
public static String getAttribute(String name, Element el)
public static void setAttribute(String name, String value, Element el)
public static void setAttribute(String name, Object value, Element el)
public static Boolean getBooleanAttribute(String name, Element el)
public static Double getDoubleAttribute(String name, Element el)
public static Float getFloatAttribute(String name, Element el)
public static Integer getIntegerAttribute(String name, Element el)
Copyright © 2014 Open Microscopy Environment