private static void orphan(Node node) { node.getParentNode().removeChild(node); }
public void endElement(String nameSpaceURI, String localName, String rawName) throws SAXException { currentNode = currentNode.getParentNode(); }
public void endElement(String nameSpaceURI, String localName, String rawName) throws SAXException { currentNode = currentNode.getParentNode(); }
public void endElement(String nameSpaceURI, String localName, String rawName) throws SAXException { currentNode = currentNode.getParentNode(); }
public void endElement(String nameSpaceURI, String localName, String rawName) throws SAXException { currentNode = currentNode.getParentNode(); }
/** * The parent of this node. All nodes, except <code>OMAttr</code>, * <code>OMDocument</code> may have a parent. * However, if a node has just been created and not yet added to the * tree, or if it has been removed from the tree, this is * <code>null</code>. * @return The parent of this node */ public final OMNode getParentNode() { Node parentNode = ot.getParentNode(); return (parentNode != null) ? convert(parentNode) : null; }
/** * The parent of this node. All nodes, except <code>OMAttr</code>, * <code>OMDocument</code> may have a parent. * However, if a node has just been created and not yet added to the * tree, or if it has been removed from the tree, this is * <code>null</code>. * @return The parent of this node */ public final OMNode getParentNode() { Node parentNode = ot.getParentNode(); return (parentNode != null) ? convert(parentNode) : null; }
@Override public Node getParentNode() { return new NodeWrapper(node.getParentNode()); }
@Override public Node getParentNode() { return new NodeWrapper(node.getParentNode()); }
private static void orphan(Node node) { node.getParentNode().removeChild(node); }
private static void orphan(Node node) { node.getParentNode().removeChild(node); }
@PatchMethod static Node getNextSibling(Node node) { Node parent = node.getParentNode(); if (parent == null) { return null; } List<Node> list = JsoUtils.getChildNodeInnerList(parent); for (int i = 0; i < list.size(); i++) { Node current = list.get(i); if (current.equals(node) && i < list.size() - 1) { return list.get(i + 1); } } return null; }
@PatchMethod static boolean isOrHasChild(final Object domImpl, final Node parent, Node child) { while (child != null) { if (parent.equals(child)) { return true; } child = child.getParentNode(); } return false; }
@PatchMethod static Node getNextSibling(Node node) { Node parent = node.getParentNode(); if (parent == null) { return null; } List<Node> list = JsoUtils.getChildNodeInnerList(parent); for (int i = 0; i < list.size(); i++) { Node current = list.get(i); if (current.equals(node) && i < list.size() - 1) { return list.get(i + 1); } } return null; }
@PatchMethod static boolean isOrHasChild(final Object domImpl, final Node parent, Node child) { while (child != null) { if (parent.equals(child)) { return true; } child = child.getParentNode(); } return false; }
@PatchMethod static Node getPreviousSibling(Node node) { Node parent = node.getParentNode(); if (parent == null) { return null; } List<Node> list = JsoUtils.getChildNodeInnerList(parent); for (int i = 0; i < list.size(); i++) { Node current = list.get(i); if (current.equals(node) && i > 0) { return list.get(i - 1); } } return null; }
@PatchMethod static Node getPreviousSibling(Node node) { Node parent = node.getParentNode(); if (parent == null) { return null; } List<Node> list = JsoUtils.getChildNodeInnerList(parent); for (int i = 0; i < list.size(); i++) { Node current = list.get(i); if (current.equals(node) && i > 0) { return list.get(i - 1); } } return null; }
@PatchMethod static Element getParentElement(Object domImpl, Node elem) { Node parent = elem.getParentNode(); if (parent == null || !(parent.getNodeType() == Node.ELEMENT_NODE)) { return null; } return parent.cast(); }
@PatchMethod static Element getParentElement(Object domImpl, Node elem) { Node parent = elem.getParentNode(); if (parent == null || !(parent.getNodeType() == Node.ELEMENT_NODE)) { return null; } return parent.cast(); }
private static void getDescendantNodes(JsNodeArray matchingElms, String nextTagStr, Node prevRef) { NodeList<Element> children = getElementsByTagName(nextTagStr, prevRef); for (int k = 0, klen = children.getLength(); k < klen; k++) { Node child = children.getItem(k); if (child.getParentNode() == prevRef) { matchingElms.addNode(child); } } }