Lines Matching refs:node

62      * tree. The source node and its children are appended as children
63 * of the destination node.
69 // get node factory
81 // copy this node
82 Node node = null;
86 node = factory.createCDATASection(place.getNodeValue());
90 node = factory.createComment(place.getNodeValue());
95 node = element;
110 node = factory.createEntityReference(place.getNodeName());
114 node = factory.createProcessingInstruction(place.getNodeName(),
119 node = factory.createTextNode(place.getNodeValue());
123 throw new IllegalArgumentException("can't copy node type, "+
128 dest.appendChild(node);
134 dest = node;
151 /** Finds and returns the first child element node. */
154 // search for node
168 /** Finds and returns the first visible child element node. */
171 // search for node
186 /** Finds and returns the first visible child element node. */
189 // search for node
204 /** Finds and returns the last child element node.
205 * Overload previous method for non-Xerces node impl.
209 // search for node
223 /** Finds and returns the last visible child element node. */
226 // search for node
241 /** Finds and returns the last visible child element node.
242 * Overload previous method for non-Xerces node impl
246 // search for node
260 /** Finds and returns the next sibling element node. */
261 public static Element getNextSiblingElement(Node node) {
263 // search for node
264 Node sibling = node.getNextSibling();
277 // get next visible (un-hidden) node.
278 public static Element getNextVisibleSiblingElement(Node node) {
280 // search for node
281 Node sibling = node.getNextSibling();
295 // get next visible (un-hidden) node, overload previous method for non Xerces node impl
296 public static Element getNextVisibleSiblingElement(Node node, Hashtable hiddenNodes) {
298 // search for node
299 Node sibling = node.getNextSibling();
314 public static void setHidden(Node node) {
315 if (node instanceof com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)
316 ((com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)node).setReadOnly(true, false);
317 else if (node instanceof com.sun.org.apache.xerces.internal.dom.NodeImpl)
318 ((com.sun.org.apache.xerces.internal.dom.NodeImpl)node).setReadOnly(true, false);
319 } // setHidden(node):void
322 public static void setHidden(Node node, Hashtable hiddenNodes) {
323 if (node instanceof com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl) {
324 ((com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)node).setReadOnly(true, false);
327 hiddenNodes.put(node, "");
329 } // setHidden(node):void
332 public static void setVisible(Node node) {
333 if (node instanceof com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)
334 ((com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)node).setReadOnly(false, false);
335 else if (node instanceof com.sun.org.apache.xerces.internal.dom.NodeImpl)
336 ((com.sun.org.apache.xerces.internal.dom.NodeImpl)node).setReadOnly(false, false);
337 } // setVisible(node):void
340 public static void setVisible(Node node, Hashtable hiddenNodes) {
341 if (node instanceof com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl) {
342 ((com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)node).setReadOnly(false, false);
345 hiddenNodes.remove(node);
347 } // setVisible(node):void
349 // is this node hidden?
350 public static boolean isHidden(Node node) {
351 if (node instanceof com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)
352 return ((com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)node).getReadOnly();
353 else if (node instanceof com.sun.org.apache.xerces.internal.dom.NodeImpl)
354 return ((com.sun.org.apache.xerces.internal.dom.NodeImpl)node).getReadOnly();
358 // is this node hidden? overloaded method
359 public static boolean isHidden(Node node, Hashtable hiddenNodes) {
360 if (node instanceof com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl) {
361 return ((com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)node).getReadOnly();
364 return hiddenNodes.containsKey(node);
368 /** Finds and returns the first child node with the given name. */
371 // search for node
387 /** Finds and returns the last child node with the given name. */
390 // search for node
406 /** Finds and returns the next sibling node with the given name. */
407 public static Element getNextSiblingElement(Node node, String elemName) {
409 // search for node
410 Node sibling = node.getNextSibling();
425 /** Finds and returns the first child node with the given qualified name. */
429 // search for node
447 /** Finds and returns the last child node with the given qualified name. */
451 // search for node
469 /** Finds and returns the next sibling node with the given qualified name. */
470 public static Element getNextSiblingElementNS(Node node,
473 // search for node
474 Node sibling = node.getNextSibling();
491 /** Finds and returns the first child node with the given name. */
494 // search for node
512 /** Finds and returns the last child node with the given name. */
515 // search for node
533 /** Finds and returns the next sibling node with the given name. */
534 public static Element getNextSiblingElement(Node node, String elemNames[]) {
536 // search for node
537 Node sibling = node.getNextSibling();
554 /** Finds and returns the first child node with the given qualified name. */
558 // search for node
578 /** Finds and returns the last child node with the given qualified name. */
582 // search for node
602 /** Finds and returns the next sibling node with the given qualified name. */
603 public static Element getNextSiblingElementNS(Node node,
606 // search for node
607 Node sibling = node.getNextSibling();
627 * Finds and returns the first child node with the given name and
635 // search for node
654 * Finds and returns the last child node with the given name and
662 // search for node
681 * Finds and returns the next sibling node with the given name and
683 * the node returned will be of type Node.ELEMENT_NODE.
685 public static Element getNextSiblingElement(Node node,
690 // search for node
691 Node sibling = node.getNextSibling();
709 * Returns the concatenated child text of the specified node.
712 * node that is of type <code>Node.CDATA_SECTION_NODE</code>
715 * @param node The node to look at.
717 public static String getChildText(Node node) {
720 if (node == null) {
726 Node child = node.getFirstChild();
744 public static String getName(Node node) {
745 return node.getNodeName();
749 returns the name of the node
751 public static String getLocalName(Node node) {
752 String name = node.getLocalName();
753 return (name!=null)? name:node.getNodeName();
764 public static Document getDocument(Node node) {
765 return node.getOwnerDocument();
768 // return this Document's root node
775 // return the right attribute node
780 // return the right attribute node
819 public static String getPrefix(Node node) {
820 return node.getPrefix();
824 public static String getNamespaceURI(Node node) {
825 return node.getNamespaceURI();
829 public static String getAnnotation(Node node) {
830 if (node instanceof ElementImpl) {
831 return ((ElementImpl)node).getAnnotation();
837 public static String getSyntheticAnnotation(Node node) {
838 if (node instanceof ElementImpl) {
839 return ((ElementImpl)node).getSyntheticAnnotation();