|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xerces.util.DOMUtil
public class DOMUtil
Some useful utility methods. This class was modified in Xerces2 with a view to abstracting as much as possible away from the representation of the underlying parsed structure (i.e., the DOM). This was done so that, if Xerces ever adopts an in-memory representation more efficient than the DOM (such as a DTM), we should easily be able to convert our schema parsing to utilize it.
Method Summary | |
---|---|
static void |
copyInto(Node src,
Node dest)
Copies the source tree into the specified place in a destination tree. |
static DOMException |
createDOMException(short code,
java.lang.Throwable cause)
Creates a DOMException. |
static LSException |
createLSException(short code,
java.lang.Throwable cause)
Creates an LSException. |
static java.lang.String |
getAnnotation(Node node)
|
static Attr |
getAttr(Element elem,
java.lang.String name)
|
static Attr |
getAttrNS(Element elem,
java.lang.String nsUri,
java.lang.String localName)
|
static Attr[] |
getAttrs(Element elem)
|
static java.lang.String |
getAttrValue(Element elem,
java.lang.String name)
|
static java.lang.String |
getAttrValueNS(Element elem,
java.lang.String nsUri,
java.lang.String localName)
|
static java.lang.String |
getChildText(Node node)
Returns the concatenated child text of the specified node. |
static Document |
getDocument(Node node)
|
static Element |
getFirstChildElement(Node parent)
Finds and returns the first child element node. |
static Element |
getFirstChildElement(Node parent,
java.lang.String elemName)
Finds and returns the first child node with the given name. |
static Element |
getFirstChildElement(Node parent,
java.lang.String[] elemNames)
Finds and returns the first child node with the given name. |
static Element |
getFirstChildElement(Node parent,
java.lang.String elemName,
java.lang.String attrName,
java.lang.String attrValue)
Finds and returns the first child node with the given name and attribute name, value pair. |
static Element |
getFirstChildElementNS(Node parent,
java.lang.String[][] elemNames)
Finds and returns the first child node with the given qualified name. |
static Element |
getFirstChildElementNS(Node parent,
java.lang.String uri,
java.lang.String localpart)
Finds and returns the first child node with the given qualified name. |
static Element |
getFirstVisibleChildElement(Node parent)
Finds and returns the first visible child element node. |
static Element |
getFirstVisibleChildElement(Node parent,
java.util.Hashtable hiddenNodes)
Finds and returns the first visible child element node. |
static Element |
getLastChildElement(Node parent)
Finds and returns the last child element node. |
static Element |
getLastChildElement(Node parent,
java.lang.String elemName)
Finds and returns the last child node with the given name. |
static Element |
getLastChildElement(Node parent,
java.lang.String[] elemNames)
Finds and returns the last child node with the given name. |
static Element |
getLastChildElement(Node parent,
java.lang.String elemName,
java.lang.String attrName,
java.lang.String attrValue)
Finds and returns the last child node with the given name and attribute name, value pair. |
static Element |
getLastChildElementNS(Node parent,
java.lang.String[][] elemNames)
Finds and returns the last child node with the given qualified name. |
static Element |
getLastChildElementNS(Node parent,
java.lang.String uri,
java.lang.String localpart)
Finds and returns the last child node with the given qualified name. |
static Element |
getLastVisibleChildElement(Node parent)
Finds and returns the last visible child element node. |
static Element |
getLastVisibleChildElement(Node parent,
java.util.Hashtable hiddenNodes)
Finds and returns the last visible child element node. |
static java.lang.String |
getLocalName(Node node)
returns local name of this element if not null, otherwise returns the name of the node |
static java.lang.String |
getName(Node node)
|
static java.lang.String |
getNamespaceURI(Node node)
|
static Element |
getNextSiblingElement(Node node)
Finds and returns the next sibling element node. |
static Element |
getNextSiblingElement(Node node,
java.lang.String elemName)
Finds and returns the next sibling node with the given name. |
static Element |
getNextSiblingElement(Node node,
java.lang.String[] elemNames)
Finds and returns the next sibling node with the given name. |
static Element |
getNextSiblingElement(Node node,
java.lang.String elemName,
java.lang.String attrName,
java.lang.String attrValue)
Finds and returns the next sibling node with the given name and attribute name, value pair. |
static Element |
getNextSiblingElementNS(Node node,
java.lang.String[][] elemNames)
Finds and returns the next sibling node with the given qualified name. |
static Element |
getNextSiblingElementNS(Node node,
java.lang.String uri,
java.lang.String localpart)
Finds and returns the next sibling node with the given qualified name. |
static Element |
getNextVisibleSiblingElement(Node node)
|
static Element |
getNextVisibleSiblingElement(Node node,
java.util.Hashtable hiddenNodes)
|
static Element |
getParent(Element elem)
|
static java.lang.String |
getPrefix(Node node)
|
static Element |
getRoot(Document doc)
|
static java.lang.String |
getSyntheticAnnotation(Node node)
|
static java.lang.String |
getValue(Attr attribute)
|
static boolean |
isHidden(Node node)
|
static boolean |
isHidden(Node node,
java.util.Hashtable hiddenNodes)
|
static void |
setHidden(Node node)
|
static void |
setHidden(Node node,
java.util.Hashtable hiddenNodes)
|
static void |
setVisible(Node node)
|
static void |
setVisible(Node node,
java.util.Hashtable hiddenNodes)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void copyInto(Node src, Node dest) throws DOMException
Note: This is an iterative implementation.
DOMException
public static Element getFirstChildElement(Node parent)
public static Element getFirstVisibleChildElement(Node parent)
public static Element getFirstVisibleChildElement(Node parent, java.util.Hashtable hiddenNodes)
public static Element getLastChildElement(Node parent)
public static Element getLastVisibleChildElement(Node parent)
public static Element getLastVisibleChildElement(Node parent, java.util.Hashtable hiddenNodes)
public static Element getNextSiblingElement(Node node)
public static Element getNextVisibleSiblingElement(Node node)
public static Element getNextVisibleSiblingElement(Node node, java.util.Hashtable hiddenNodes)
public static void setHidden(Node node)
public static void setHidden(Node node, java.util.Hashtable hiddenNodes)
public static void setVisible(Node node)
public static void setVisible(Node node, java.util.Hashtable hiddenNodes)
public static boolean isHidden(Node node)
public static boolean isHidden(Node node, java.util.Hashtable hiddenNodes)
public static Element getFirstChildElement(Node parent, java.lang.String elemName)
public static Element getLastChildElement(Node parent, java.lang.String elemName)
public static Element getNextSiblingElement(Node node, java.lang.String elemName)
public static Element getFirstChildElementNS(Node parent, java.lang.String uri, java.lang.String localpart)
public static Element getLastChildElementNS(Node parent, java.lang.String uri, java.lang.String localpart)
public static Element getNextSiblingElementNS(Node node, java.lang.String uri, java.lang.String localpart)
public static Element getFirstChildElement(Node parent, java.lang.String[] elemNames)
public static Element getLastChildElement(Node parent, java.lang.String[] elemNames)
public static Element getNextSiblingElement(Node node, java.lang.String[] elemNames)
public static Element getFirstChildElementNS(Node parent, java.lang.String[][] elemNames)
public static Element getLastChildElementNS(Node parent, java.lang.String[][] elemNames)
public static Element getNextSiblingElementNS(Node node, java.lang.String[][] elemNames)
public static Element getFirstChildElement(Node parent, java.lang.String elemName, java.lang.String attrName, java.lang.String attrValue)
public static Element getLastChildElement(Node parent, java.lang.String elemName, java.lang.String attrName, java.lang.String attrValue)
public static Element getNextSiblingElement(Node node, java.lang.String elemName, java.lang.String attrName, java.lang.String attrValue)
public static java.lang.String getChildText(Node node)
Node.TEXT_NODE
or the children of any child
node that is of type Node.CDATA_SECTION_NODE
for the concatenation.
node
- The node to look at.public static java.lang.String getName(Node node)
public static java.lang.String getLocalName(Node node)
public static Element getParent(Element elem)
public static Document getDocument(Node node)
public static Element getRoot(Document doc)
public static Attr getAttr(Element elem, java.lang.String name)
public static Attr getAttrNS(Element elem, java.lang.String nsUri, java.lang.String localName)
public static Attr[] getAttrs(Element elem)
public static java.lang.String getValue(Attr attribute)
public static java.lang.String getAttrValue(Element elem, java.lang.String name)
public static java.lang.String getAttrValueNS(Element elem, java.lang.String nsUri, java.lang.String localName)
public static java.lang.String getPrefix(Node node)
public static java.lang.String getNamespaceURI(Node node)
public static java.lang.String getAnnotation(Node node)
public static java.lang.String getSyntheticAnnotation(Node node)
public static DOMException createDOMException(short code, java.lang.Throwable cause)
public static LSException createLSException(short code, java.lang.Throwable cause)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |