static private Element nextElement(Node node) { if (node.hasChildNodes()) { NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child instanceof Element) { return (Element) child; } } } Element nextSiblingElement = nextSiblingElement(node); if (nextSiblingElement != null) { return nextSiblingElement; } Node parent = node.getParentNode(); while (parent instanceof Element) { Element next = nextSiblingElement(parent); if (next != null) { return next; } parent = parent.getParentNode(); } return null; }
result = (previous == null) ? null : new DOMNodeModel(previous); } else if ("nextSiblingElement".equals(key)) { Node next = nextSiblingElement(node); result = (next == null) ? null : new DOMNodeModel(next); } else if ("previousSiblingElement".equals(key)) {
static private Element nextElement(Node node) { if (node.hasChildNodes()) { NodeList children = node.getChildNodes(); for (int i=0; i<children.getLength();i++) { Node child = children.item(i); if (child instanceof Element) { return (Element) child; } } } Element nextSiblingElement = nextSiblingElement(node); if (nextSiblingElement != null) { return nextSiblingElement; } Node parent = node.getParentNode(); while (parent instanceof Element) { Element next = nextSiblingElement(parent); if (next != null) { return next; } parent = parent.getParentNode(); } return null; }
static private Element nextElement(Node node) { if (node.hasChildNodes()) { NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child instanceof Element) { return (Element) child; } } } Element nextSiblingElement = nextSiblingElement(node); if (nextSiblingElement != null) { return nextSiblingElement; } Node parent = node.getParentNode(); while (parent instanceof Element) { Element next = nextSiblingElement(parent); if (next != null) { return next; } parent = parent.getParentNode(); } return null; }
static private Element nextElement(Node node) { if (node.hasChildNodes()) { NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); if (child instanceof Element) { return (Element) child; } } } Element nextSiblingElement = nextSiblingElement(node); if (nextSiblingElement != null) { return nextSiblingElement; } Node parent = node.getParentNode(); while (parent instanceof Element) { Element next = nextSiblingElement(parent); if (next != null) { return next; } parent = parent.getParentNode(); } return null; }
result = (previous == null) ? null : new DOMNodeModel(previous); } else if ("nextSiblingElement".equals(key)) { Node next = nextSiblingElement(node); result = (next == null) ? null : new DOMNodeModel(next); } else if ("previousSiblingElement".equals(key)) {
result = (previous == null) ? null : new DOMNodeModel(previous); } else if ("nextSiblingElement".equals(key)) { Node next = nextSiblingElement(node); result = (next == null) ? null : new DOMNodeModel(next); } else if ("previousSiblingElement".equals(key)) {
Node next = nextSiblingElement(node); result = (next == null) ? null : new DOMNodeModel(next);