public abstract class DxDOMUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static com.novell.xml.util.ExpandedQName |
SEARCH_NULL_ANY
Wildcard search name that will match the null namespace URI and any local part.
|
static java.lang.String |
TAG_WILDCARD
Wildcard value that can be used for both the
namespaceURI and localPart parameters to
the various "ByTagName" functions |
Constructor and Description |
---|
DxDOMUtil() |
Modifier and Type | Method and Description |
---|---|
static org.w3c.dom.Document |
cloneDocument(org.w3c.dom.Document doc)
Creates clone of a document.
|
static org.w3c.dom.Node |
cloneSubtree(org.w3c.dom.Document targetDoc,
org.w3c.dom.Node sourceRoot)
Clone a subtree, possibly into another document
|
static boolean |
copyAttributeEx(com.novell.xml.dom.ElementImpl src,
com.novell.xml.util.ExpandedQName attrName,
com.novell.xml.dom.ElementImpl dest)
Copy an attribute from one element to another, but only if the attribute has
a non-empty value.
|
static boolean |
copyAttributeEx(com.novell.xml.dom.ElementImpl src,
com.novell.xml.util.ExpandedQName srcAttrName,
com.novell.xml.dom.ElementImpl dest,
com.novell.xml.util.ExpandedQName destAttrName)
Copy an attribute from one element to another, but only if the attribute has
a non-empty value.
|
static boolean |
copyAttributeNS(org.w3c.dom.Element src,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalName,
org.w3c.dom.Element dest)
Copy an attribute from one element to another, but only if the attribute has
a non-empty value
|
static boolean |
copyAttributeNS(org.w3c.dom.Element src,
java.lang.String srcAttrNamespaceURI,
java.lang.String srcAttrLocalPart,
org.w3c.dom.Element dest,
java.lang.String destAttrNamespaceURI,
java.lang.String destAttrQName)
Copy an attribute from one element to another, with an new attribute name, but only if the attribute has
a non-empty value.
|
static org.w3c.dom.Element[] |
elementArrayListToElementArray(java.util.ArrayList arrayList)
Create an array of
Element s from an ArrayList containing only Element s. |
static com.novell.xml.dom.ElementImpl[] |
elementImplArrayListToElementImplArray(java.util.ArrayList arrayList)
creates an array of
ElementImpl s from an ArrayList containing
only ElementImpl s. |
static void |
ensureDOMImpl(XmlDocument src)
Conditionally convert the passed document to the DirXML DOM implementation.
|
static java.lang.String |
getAssociationState(org.w3c.dom.Element element)
Get the value of the "state" attribute of the first <association> element
found under the passed element.
|
static java.lang.String |
getAssociationStateEx(com.novell.xml.dom.ElementImpl element)
Get the value of the "state" attribute of the first <association> element
found under the passed element.
|
static java.lang.String |
getAssociationValue(org.w3c.dom.Element element)
Get the value of the first <association> element found under the passed element.
|
static java.lang.String |
getAssociationValueEx(com.novell.xml.dom.ElementImpl element)
Get the value of the first <association> element found under the passed element.
|
static org.w3c.dom.Element[] |
getChildElements(org.w3c.dom.Node node)
Get all child elements of a node.
|
static com.novell.xml.dom.ElementImpl[] |
getChildElementsByTagNameEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName qName)
Get the all child elements of a node with a particular qualified tag name.
|
static org.w3c.dom.Element[] |
getChildElementsByTagNameNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart)
Get the all child elements of a node with a particular qualified tag name.
|
static com.novell.xml.dom.ElementImpl[] |
getChildElementsByTagNameWithAttrEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName)
Get all child elements of a node with a particular QName and
a particular non-empty attribute.
|
static org.w3c.dom.Element[] |
getChildElementsByTagNameWithAttrNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart)
Get all child elements of a node with a particular qualified tag name and
a particular non-empty attribute.
|
static com.novell.xml.dom.ElementImpl[] |
getChildElementsByTagNameWithAttrValueEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName,
java.lang.String attrValue)
Get all child elements of a node with a particular QName and
a particular attribute/value pair (value is case sensitive)
|
static com.novell.xml.dom.ElementImpl[] |
getChildElementsByTagNameWithAttrValueIgnoreCaseEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName,
java.lang.String attrValue)
Get all child elements of a node with a particular QName and
a particular attribute/value pair (value is not case sensitive)
|
static org.w3c.dom.Element[] |
getChildElementsByTagNameWithAttrValueIgnoreCaseNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart,
java.lang.String attrValue)
Get all child elements of a node with a particular tag name and
a particular attribute/value pair (value is not case sensitive)
|
static org.w3c.dom.Element[] |
getChildElementsByTagNameWithAttrValueNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart,
java.lang.String attrValue)
Get all child elements of a node with a particular tag name and
a particular attribute/value pair (value is case sensitive)
|
static com.novell.xml.dom.ElementImpl[] |
getChildElementsEx(com.novell.xml.dom.NodeImpl node)
Get all child elements of a node.
|
static java.lang.String |
getChildText(org.w3c.dom.Node node)
Get the concatenation of all the child text nodes of the passed node.
|
static org.w3c.dom.NodeList |
getElementsByTagNameEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName qName)
Get all descendant
Element s of a node with a particular tag name. |
static org.w3c.dom.NodeList |
getElementsByTagNameNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart)
Get all descendant elements of a node with a particular
qualified tag name.
|
static com.novell.xml.dom.ElementImpl[] |
getElementsByTagNameWithAttrEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName)
Get all descendant elements of an node with a particular QName and
a particular non-empty attribute.
|
static org.w3c.dom.Element[] |
getElementsByTagNameWithAttrNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart)
Get all descendant elements of an node with a particular tag name and
a particular non-empty attribute.
|
static com.novell.xml.dom.ElementImpl[] |
getElementsByTagNameWithAttrValueEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName,
java.lang.String attrValue)
Get all descendant elements of an node with a QName and
a particular attribute/value pair (value is case sensitive)
|
static org.w3c.dom.Element[] |
getElementsByTagNameWithAttrValueNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart,
java.lang.String attrValue)
Get all descendant elements of an node with a particular tag name and
a particular attribute/value pair (value is case sensitive)
|
static com.novell.xml.dom.ElementImpl |
getFirstAncestorElementByTagNameEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName)
Get the nearest ancestor element of an node with a particular QName
|
static org.w3c.dom.Element |
getFirstAncestorElementByTagNameNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart)
Get the nearest ancestor element of an node with a particular tag name
|
static com.novell.xml.dom.ElementImpl |
getFirstAncestorElementByTagNameWithAttrEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName)
Get the nearest ancestor element of an node with a particular QName and a
particular non-empty attribute.
|
static org.w3c.dom.Element |
getFirstAncestorElementByTagNameWithAttrNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart)
Get the nearest ancestor element of an node with a particular tag name and
a particular non-empty attribute.
|
static org.w3c.dom.Element |
getFirstChildElement(org.w3c.dom.Node node)
Get the first child element of a node
|
static com.novell.xml.dom.ElementImpl |
getFirstChildElementByTagNameEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName qName)
Get the first child element of a node with a particular tag name.
|
static org.w3c.dom.Element |
getFirstChildElementByTagNameNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart)
Get a node's first child element with a particular qualified tag name.
|
static com.novell.xml.dom.ElementImpl |
getFirstChildElementByTagNameWithAttrValueEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName,
java.lang.String attrValue)
Get the first child element of a node with a particular tag name and
a particular attribute/value pair (value is case sensitive)
|
static com.novell.xml.dom.ElementImpl |
getFirstChildElementByTagNameWithAttrValueIgnoreCaseEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName,
java.lang.String attrValue)
Get the first child element of a node with a particular tag name and
a particular attribute/value pair (value is not case sensitive)
|
static org.w3c.dom.Element |
getFirstChildElementByTagNameWithAttrValueIgnoreCaseNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart,
java.lang.String attrValue)
Get the first child element of a node with a particular tag name and
a particular attribute/value pair (value is not case sensitive)
|
static org.w3c.dom.Element |
getFirstChildElementByTagNameWithAttrValueNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart,
java.lang.String attrValue)
Get the first child element of a node with a particular tag name and
a particular attribute/value pair (value is case sensitive)
|
static com.novell.xml.dom.ElementImpl |
getFirstChildElementEx(com.novell.xml.dom.NodeImpl node)
Get the first child element of a node
|
static com.novell.xml.dom.ElementImpl |
getFirstElementByTagNameEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName qName)
Get first descendant element of an node with a particular tag name.
|
static org.w3c.dom.Element |
getFirstElementByTagNameNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart)
Get first descendant element of an node with a particular tag name.
|
static com.novell.xml.dom.ElementImpl |
getFirstElementByTagNameWithAttrValueEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName,
com.novell.xml.util.ExpandedQName attrName,
java.lang.String attrValue)
Get the first descendant element of an node with a particular QName and
a particular attribute/value pair (value is case sensitive)
|
static org.w3c.dom.Element |
getFirstElementByTagNameWithAttrValueNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart,
java.lang.String attrNamespaceURI,
java.lang.String attrLocalPart,
java.lang.String attrValue)
Get the first descendant elements of an node with a particular tag name and
a particular attribute/value pair (value is case sensitive)
|
static org.w3c.dom.Element |
getFirstValue(org.w3c.dom.Node node,
java.lang.String attrName)
Get the first <value> element for the passed directory attribute.
|
static com.novell.xml.dom.ElementImpl |
getFirstValueEx(com.novell.xml.dom.NodeImpl node,
java.lang.String attrName)
Get the first <value> element for the passed directory attribute.
|
static java.lang.String |
getNodeText(org.w3c.dom.Node node)
Get the string value for a node (as defined by XPath).
|
static java.util.Date |
getTimestamp(org.w3c.dom.Element element)
Get a
Date instance from the timestamp attribute for an element |
static int |
getTimestampEventCount(org.w3c.dom.Element element)
Get the timestamp event count from the timestamp attribute for an element
|
static int |
getTimestampEventCountEx(com.novell.xml.dom.ElementImpl element)
Get the timestamp event count from the timestamp attribute for an element
|
static java.util.Date |
getTimestampEx(com.novell.xml.dom.ElementImpl element)
Get a
Date instance from the timestamp attribute for an element |
static void |
graftSubtree(org.w3c.dom.Node parent,
org.w3c.dom.Node sourceRoot)
Graft a cloned subtree, possibly into another document
|
static org.w3c.dom.Node[] |
nodeListToNodeArray(org.w3c.dom.NodeList list)
Create an array of nodes from a
NodeList . |
static void |
removeAllChildren(org.w3c.dom.Node node)
Remove all the children of a node.
|
static void |
removeChildElementsByTagNameEx(com.novell.xml.dom.NodeImpl node,
com.novell.xml.util.ExpandedQName elementName)
Remove all child elements of a node with a particular QName.
|
static void |
removeChildElementsByTagNameNS(org.w3c.dom.Node node,
java.lang.String namespaceURI,
java.lang.String localPart)
Remove all child elements of a node with a particular tag name.
|
static com.novell.xml.dom.ElementImpl |
renameElementEx(com.novell.xml.dom.ElementImpl element,
com.novell.xml.util.ExpandedQName newName)
Rename an element.
|
static org.w3c.dom.Element |
renameElementNS(org.w3c.dom.Element element,
java.lang.String namespaceURI,
java.lang.String qName)
Rename an element.
|
static void |
setNodeText(org.w3c.dom.Node node,
java.lang.String text)
Set the string value for a node.
|
public static final java.lang.String TAG_WILDCARD
namespaceURI
and localPart
parameters to
the various "ByTagName" functionsprotected static final com.novell.xml.util.ExpandedQName SEARCH_NULL_ANY
public static java.lang.String getNodeText(org.w3c.dom.Node node)
node
- the nodepublic static java.lang.String getChildText(org.w3c.dom.Node node)
node
- the parent nodepublic static void setNodeText(org.w3c.dom.Node node, java.lang.String text)
null
or empty no child is added.node
- the parent nodetext
- the desired text value of the nodepublic static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node)
node
- the parent nodenull
if no such element existspublic static com.novell.xml.dom.ElementImpl getFirstChildElementEx(com.novell.xml.dom.NodeImpl node)
node
- the parent nodenull
if no such element existspublic static org.w3c.dom.Element getFirstChildElementByTagNameNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag namenull
if no such element existspublic static com.novell.xml.dom.ElementImpl getFirstChildElementByTagNameEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName qName)
node
- the nodeqName
- the expanded QName of the element to findnull
if no such element existspublic static org.w3c.dom.Element getFirstChildElementByTagNameWithAttrValueNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart, java.lang.String attrValue)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified nameattrValue
- the attribute valuenull
if no such element existspublic static com.novell.xml.dom.ElementImpl getFirstChildElementByTagNameWithAttrValueEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName, java.lang.String attrValue)
node
- the parent nodeelementName
- the qualified element nameattrName
- the qualifed attribute nameattrValue
- the attribute valuenull
if no such element existspublic static org.w3c.dom.Element getFirstChildElementByTagNameWithAttrValueIgnoreCaseNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart, java.lang.String attrValue)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified nameattrValue
- the attribute valuenull
if no such element existspublic static com.novell.xml.dom.ElementImpl getFirstChildElementByTagNameWithAttrValueIgnoreCaseEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName, java.lang.String attrValue)
node
- the nodeelementName
- the qualified element nameattrName
- the qualifed attribute nameattrValue
- the attribute valuenull
if no such element existspublic static org.w3c.dom.Element[] getChildElements(org.w3c.dom.Node node)
node
- the parent node0
length, but never null
public static com.novell.xml.dom.ElementImpl[] getChildElementsEx(com.novell.xml.dom.NodeImpl node)
node
- the parent node0
length, but never null
public static org.w3c.dom.Element[] getChildElementsByTagNameNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart)
node
- the parent nodenamespaceURI
- element name's namespace URIlocalPart
- the element name's local part0
length, but never null
public static com.novell.xml.dom.ElementImpl[] getChildElementsByTagNameEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName qName)
node
- the parent nodeqName
- the element name0
length, but never null
public static org.w3c.dom.Element[] getChildElementsByTagNameWithAttrNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified name0
length, but never null
public static com.novell.xml.dom.ElementImpl[] getChildElementsByTagNameWithAttrEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName)
node
- the parent nodeelementName
- the QName of the elements to findattrName
- the QName of the non-empty attribute0
length, but never null
public static org.w3c.dom.Element[] getChildElementsByTagNameWithAttrValueNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart, java.lang.String attrValue)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified nameattrValue
- the attribute value0
length, but never null
public static com.novell.xml.dom.ElementImpl[] getChildElementsByTagNameWithAttrValueEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName, java.lang.String attrValue)
node
- the parent nodeelementName
- the child elements' QNameattrName
- the attributes' QNameattrValue
- the attribute value0
length, but never null
public static org.w3c.dom.Element[] getChildElementsByTagNameWithAttrValueIgnoreCaseNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart, java.lang.String attrValue)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified nameattrValue
- the attribute value0
length, but never null
public static com.novell.xml.dom.ElementImpl[] getChildElementsByTagNameWithAttrValueIgnoreCaseEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName, java.lang.String attrValue)
node
- the parent nodeelementName
- the child elements' QNameattrName
- the attributes' QNameattrValue
- the attribute value0
length, but never null
public static org.w3c.dom.NodeList getElementsByTagNameNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameNodeList
containing any matching elementspublic static org.w3c.dom.NodeList getElementsByTagNameEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName qName)
Element
s of a node with a particular tag name.
Wildcards may be used, either by passing ExpandedQName.WILDCARD_QNAME
,
or by constructing an ExpandedQName
instance using some combination of
NamespaceName.WILDCARD_NAMESPACE
and ExpandedQName.WILDCARD_LOCALPART
.node
- the node whose descendants are to be foundqName
- the QName of the descendant Element
s to findElement
spublic static org.w3c.dom.Element[] getElementsByTagNameWithAttrNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified name0
length, but never null
public static com.novell.xml.dom.ElementImpl[] getElementsByTagNameWithAttrEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName)
node
- the parent nodeelementName
- the QName of the desired elementsattrName
- the QName of the attribute0
length, but never null
public static org.w3c.dom.Element[] getElementsByTagNameWithAttrValueNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart, java.lang.String attrValue)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified nameattrValue
- the attribute value0
length, but never null
public static com.novell.xml.dom.ElementImpl[] getElementsByTagNameWithAttrValueEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName, java.lang.String attrValue)
node
- the parent nodeelementName
- the QName of the desired elementsattrName
- the QName of the attributeattrValue
- the attribute value0
length, but never null
public static void removeChildElementsByTagNameNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag namepublic static void removeChildElementsByTagNameEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName)
node
- the parent nodeelementName
- the elements' QNamepublic static org.w3c.dom.Element getFirstElementByTagNameNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag namenull
if no such element existspublic static com.novell.xml.dom.ElementImpl getFirstElementByTagNameEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName qName)
node
- the nodeqName
- the tag name to findnull
if no such element existspublic static org.w3c.dom.Element getFirstElementByTagNameWithAttrValueNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart, java.lang.String attrValue)
node
- the parent nodenamespaceURI
- the namespace URI of the qualified tag namelocalPart
- the local part of the qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified nameattrValue
- the attribute value0
length, but never null
public static com.novell.xml.dom.ElementImpl getFirstElementByTagNameWithAttrValueEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName, java.lang.String attrValue)
node
- the parent nodeelementName
- the child elements' QNameattrName
- the attributes' QNameattrValue
- the attribute value0
length, but never null
public static org.w3c.dom.Node cloneSubtree(org.w3c.dom.Document targetDoc, org.w3c.dom.Node sourceRoot)
targetDoc
- target document for the cloned documentsourceRoot
- root of subtree to clonenull
if not cloneablepublic static void graftSubtree(org.w3c.dom.Node parent, org.w3c.dom.Node sourceRoot)
parent
- target parentsourceRoot
- root of subtree to clonepublic static org.w3c.dom.Document cloneDocument(org.w3c.dom.Document doc)
doc
- document to clonepublic static org.w3c.dom.Element renameElementNS(org.w3c.dom.Element element, java.lang.String namespaceURI, java.lang.String qName)
element
- element to be renamednamespaceURI
- the namespace URI of the new qualified tag nameqName
- "[prefix:]local part" of the new qualified tag namepublic static com.novell.xml.dom.ElementImpl renameElementEx(com.novell.xml.dom.ElementImpl element, com.novell.xml.util.ExpandedQName newName)
element
- element to be renamednewName
- the new QName for the elementpublic static void removeAllChildren(org.w3c.dom.Node node)
node
- the parent nodepublic static org.w3c.dom.Element getFirstAncestorElementByTagNameNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart)
node
- the starting nodenamespaceURI
- the namespace URI of the ancestor's qualified tag namelocalPart
- the local part of the ancestor's qualified tag namenull
if no such element existspublic static com.novell.xml.dom.ElementImpl getFirstAncestorElementByTagNameEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName)
node
- the node from which to startelementName
- the ancestor element's QNamenull
if no such element existspublic static org.w3c.dom.Element getFirstAncestorElementByTagNameWithAttrNS(org.w3c.dom.Node node, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String attrNamespaceURI, java.lang.String attrLocalPart)
node
- the starting nodenamespaceURI
- the namespace URI of the ancestor's qualified tag namelocalPart
- the local part of the ancestor's qualified tag nameattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified namenull
if no such element existspublic static com.novell.xml.dom.ElementImpl getFirstAncestorElementByTagNameWithAttrEx(com.novell.xml.dom.NodeImpl node, com.novell.xml.util.ExpandedQName elementName, com.novell.xml.util.ExpandedQName attrName)
node
- the node from which to startelementName
- the ancestor element's QNameattrName
- the attribute namenull
if no such element existspublic static org.w3c.dom.Node[] nodeListToNodeArray(org.w3c.dom.NodeList list)
NodeList
.list
- the NodeList
list
public static org.w3c.dom.Element[] elementArrayListToElementArray(java.util.ArrayList arrayList)
Element
s from an ArrayList
containing only Element
s.arrayList
- the listarrayList
public static com.novell.xml.dom.ElementImpl[] elementImplArrayListToElementImplArray(java.util.ArrayList arrayList)
ElementImpl
s from an ArrayList
containing
only ElementImpl
s.arrayList
- the listElementImpl
s containing the same members as the parameterpublic static java.lang.String getAssociationValue(org.w3c.dom.Element element)
element
- the elementnull
)public static java.lang.String getAssociationValueEx(com.novell.xml.dom.ElementImpl element)
element
- the elementnull
)public static java.lang.String getAssociationState(org.w3c.dom.Element element)
element
- the elementnull
)public static java.lang.String getAssociationStateEx(com.novell.xml.dom.ElementImpl element)
element
- the elementnull
)public static org.w3c.dom.Element getFirstValue(org.w3c.dom.Node node, java.lang.String attrName)
node
- the node at which to startattrName
- the directory attribute namenull
if no such element existspublic static com.novell.xml.dom.ElementImpl getFirstValueEx(com.novell.xml.dom.NodeImpl node, java.lang.String attrName)
node
- the node at which to startattrName
- the directory attribute namenull
if no such element existspublic static boolean copyAttributeNS(org.w3c.dom.Element src, java.lang.String attrNamespaceURI, java.lang.String attrLocalName, org.w3c.dom.Element dest)
src
- source elementattrNamespaceURI
- the namespace URI of the attribute's qualified nameattrLocalPart
- the local part of the attribute's qualified namedest
- destination elementtrue
if an attribute was copiedpublic static boolean copyAttributeEx(com.novell.xml.dom.ElementImpl src, com.novell.xml.util.ExpandedQName attrName, com.novell.xml.dom.ElementImpl dest)
src
- source element containing the attribute to copyattrName
- QName of the attributedest
- destination element for the attributetrue
if an attribute was copiedpublic static boolean copyAttributeNS(org.w3c.dom.Element src, java.lang.String srcAttrNamespaceURI, java.lang.String srcAttrLocalPart, org.w3c.dom.Element dest, java.lang.String destAttrNamespaceURI, java.lang.String destAttrQName)
src
- source elementsrcAttrNamespaceURI
- the namespace URI of the source attribute's qualified namesrcAttrLocalPart
- the local part of the source attribute's qualified namedest
- destination elementdestAttrNamespaceURI
- the namespace URI of the destination attribute's qualified namedestAttrQName
- "[prefix:]local part" of the destination attribute's qualified nametrue
if an attribute was copiedpublic static boolean copyAttributeEx(com.novell.xml.dom.ElementImpl src, com.novell.xml.util.ExpandedQName srcAttrName, com.novell.xml.dom.ElementImpl dest, com.novell.xml.util.ExpandedQName destAttrName)
src
- source element containing the attribute to copysrcAttrName
- QName of the source attributedest
- destination element for the attributedestAttrName
- QName of the destination attributetrue
if there was an attribute to copypublic static void ensureDOMImpl(XmlDocument src)
src
- documentpublic static java.util.Date getTimestamp(org.w3c.dom.Element element)
Date
instance from the timestamp attribute for an elementelement
- the element containing the "timestamp" attributenull
otherwisepublic static java.util.Date getTimestampEx(com.novell.xml.dom.ElementImpl element)
Date
instance from the timestamp attribute for an elementelement
- the element containing the "timestamp" attributenull
otherwisepublic static int getTimestampEventCount(org.w3c.dom.Element element)
element
- an element containing the "timestamp" attributepublic static int getTimestampEventCountEx(com.novell.xml.dom.ElementImpl element)
element
- an element containing the "timestamp" attribute