Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static String | Returns: String containing the local name, or null if the node was not assigned a Namespace.Node to be examined n)Returns the local name of the given node, as defined by the XML Namespaces specification. |
private static String | Returns: String containing the Local Namethe node to be examined. n)Returns the local name of the given node. |
public static String | Returns: String containing the Namespace URI bound to this DOM node at the time the Node was created.Node to be examined n)Returns the Namespace Name (Namespace URI) for the given node. |
public static Node | Returns: the DOM parent of the input node, if there is one, or the ownerElement if the input node is an Attr, or null if the node is a Document, a DocumentFragment, or an orphan.Node to be examined node)Get the XPath-model parent of a node. |
public static boolean | Returns: false if node2 comes before node1, otherwise return true. You can think of this as(node1.documentOrderPosition <= node2.documentOrderPosition) .DOM Node to perform position comparison on. node1, Node DOM Node to perform position comparison on . node2)Figure out whether node2 should be considered as being later in the document than node1, in Document Order as defined by the XPath model. |
private static boolean | Returns: true if child 2 is after child1 in document order.Must be the parent of both child1 and child2. parent, Node Must be the child of parent and not equal to child2. child1, Node Must be the child of parent and not equal to child1. child2)Figure out if child2 is after child1 in document order. |
public static boolean | Returns: true if the two nodes are the same.The first DOM node to compare. node1, Node The second DOM node to compare. node2)Use DTMNodeProxy to determine whether two nodes are the same. |
DOM2Helper | back to summary |
---|---|
private DOM2Helper() Construct an instance. |
getLocalNameOfNode | back to summary |
---|---|
public static String getLocalNameOfNode(Node n) Returns the local name of the given node, as defined by the XML Namespaces specification. This is prepared to handle documents built using DOM Level 1 methods by falling back upon explicitly parsing the node name. |
getLocalNameOfNodeFallback | back to summary |
---|---|
private static String getLocalNameOfNodeFallback(Node n) Returns the local name of the given node. If the node's name begins with a namespace prefix, this is the part after the colon; otherwise it's the full node name. This method is copied from com.sun.org.apache.xml.internal.utils.DOMHelper |
getNamespaceOfNode | back to summary |
---|---|
public static String getNamespaceOfNode(Node n) Returns the Namespace Name (Namespace URI) for the given node. In a Level 2 DOM, you can ask the node itself. Note, however, that doing so conflicts with our decision in getLocalNameOfNode not to trust the that the DOM was indeed created using the Level 2 methods. If Level 1 methods were used, these two functions will disagree with each other. Todo Reconcile with getLocalNameOfNode. |
getParentOfNode | back to summary |
---|---|
public static Node getParentOfNode(Node node) Get the XPath-model parent of a node. This version takes advantage of the DOM Level 2 Attr.ownerElement() method; the base version we would otherwise inherit is prepared to fall back on exhaustively walking the document to find an Attr's parent. |
isNodeAfter | back to summary |
---|---|
public static boolean isNodeAfter(Node node1, Node node2) Figure out whether node2 should be considered as being later in the document than node1, in Document Order as defined by the XPath model. This may not agree with the ordering defined by other XML applications. There are some cases where ordering isn't defined, and neither are the results of this function -- though we'll generally return true. |
isNodeAfterSibling | back to summary |
---|---|
private static boolean isNodeAfterSibling(Node parent, Node child1, Node child2) Figure out if child2 is after child1 in document order. Warning Some aspects of "document order" are not well defined. For example, the order of attributes is considered meaningless in XML, and the order reported by our model will be consistent for a given invocation but may not match that of either the source file or the serialized output. |
isNodeTheSame | back to summary |
---|---|
public static boolean isNodeTheSame(Node node1, Node node2) Use DTMNodeProxy to determine whether two nodes are the same. |