Lines Matching refs:node

86       // create a DOM Document node to contain the result.
135 * from the node. Literal elements from template elements should
137 * @param textNode A text node from the source tree.
138 * @return true if the text node should be stripped of extra whitespace.
169 * (DOM Level 3 is investigating providing a unique node "key", but
172 * @param node whose identifier you want to obtain
176 public String getUniqueID(Node node)
178 return "N" + Integer.toHexString(node.hashCode()).toUpperCase();
240 int nParents1 = 2, nParents2 = 2; // include node & parent obtained above
317 // "same node" case. Fix if/when needed.
330 * @param node1 The first DOM node to compare.
331 * @param node2 The second DOM node to compare.
468 * Get the depth level of this node in the tree (equals 1 for
469 * a parentless node).
570 /** Object to put into the m_NSInfos table that tells that a node has not been
575 /** Object to put into the m_NSInfos table that tells that a node has not been
580 /** Object to put into the m_NSInfos table that tells that a node has not been
585 /** Object to put into the m_NSInfos table that tells that a node has been
590 /** Object to put into the m_NSInfos table that tells that a node has been
595 /** Object to put into the m_NSInfos table that tells that a node has been
600 /** Vector of node (odd indexes) and NSInfos (even indexes) that tell if
601 * the given node is a candidate for ancestor namespace processing. */
605 * Returns the namespace of the given node. Differs from simply getting
606 * the node's prefix and using getNamespaceForPrefix in that it attempts
612 * @return String containing the Namespace Name (uri) for this node.
815 * Returns the local name of the given node. If the node's name begins
817 * it's the full node name.
819 * @param n the node to be examined.
835 * representation of a node name, but it allows convenient
840 * @return String in the form "namespaceURI:localname" if the node
857 * representation of a node name, but it allows convenient
862 * @return String in the form "namespaceURI:localname" if the node
881 * Tell if the node is ignorable whitespace. Note that this can
887 * @param node Node to be examined
890 * and only if the node is of type Text, contains only whitespace,
895 public boolean isIgnorableWhitespace(Text node)
910 * Get the first unparented node in the ancestor chain.
913 * @param node Starting node, to specify which chain to chase
917 public Node getRoot(Node node)
922 while (node != null)
924 root = node;
925 node = getParentOfNode(node);
932 * Get the root node of the document tree, regardless of
933 * whether or not the node passed in is a document node.
938 * rewrite the description to say that it finds the Document node,
944 * @return the Document node. Note that this is not the correct answer
945 * if n was (or was a child of) a DocumentFragment or an orphaned node,
957 * Test whether the given node is a namespace decl node. In DOM Level 2
959 * it has to be done by testing the node name.
963 * @return boolean -- true iff the node is an Attr whose name is
980 * Obtain the XPath-model parent of a DOM node -- ownerElement for Attrs,
995 * @param node Node whose XPath parent we want to obtain
997 * @return the parent of the node, or the ownerElement if it's an
998 * Attr node, or null if the node is an orphan.
1005 public static Node getParentOfNode(Node node) throws RuntimeException
1008 short nodeType = node.getNodeType();
1012 Document doc = node.getOwnerDocument();
1033 parent=((Attr)node).getOwnerElement();
1049 parent = locateAttrParent(rootElem, node);
1054 parent = node.getParentNode();
1080 * The node which has this unique identifier, or null if there
1081 * is no such node or this DOM can't reliably recognize it.
1091 * node (see [3.3 Unparsed Entities]). It returns the empty string if
1118 * @param doc Document node for the document to be searched.
1205 for (Node node = elem.getFirstChild(); null != node;
1206 node = node.getNextSibling())
1208 if (Node.ELEMENT_NODE == node.getNodeType())
1210 parent = locateAttrParent((Element) node, attr);
1230 * Document node...
1258 * Get the textual contents of the node. See
1262 * @param node DOM Node to be examined
1264 * textual content within that node.
1268 public static String getNodeData(Node node)
1276 getNodeData(node, buf);
1300 * @param node Node whose subtree is to be walked, gathering the
1305 public static void getNodeData(Node node, FastStringBuffer buf)
1308 switch (node.getNodeType())
1314 for (Node child = node.getFirstChild(); null != child;
1323 buf.append(node.getNodeValue());
1326 buf.append(node.getNodeValue());