/** * Returns last child <b>element</b> node or * <code>null</code> if no such child node exist. */ public Element getLastChildElement() { initChildElementNodes(); if (childElementNodes.length == 0) { return null; } return childElementNodes[childElementNodes.length - 1]; }
/** * Returns a child element node at given index. * If index is out of bounds, <code>null</code> is returned. */ public Element getChildElement(final int index) { initChildElementNodes(); if ((index < 0) || (index >= childElementNodes.length)) { return null; } return childElementNodes[index]; }
/** * Returns first child <b>element</b> node or * <code>null</code> if no element children exist. */ public Element getFirstChildElement() { initChildElementNodes(); if (childElementNodes.length == 0) { return null; } return childElementNodes[0]; }
/** * Returns an array of all children elements. */ public Element[] getChildElements() { initChildElementNodes(); return childElementNodes.clone(); }
/** * Returns this node's previous sibling of <b>element</b> type * or <code>null</code> if this is the first sibling. */ public Node getPreviousSiblingElement() { parentNode.initChildElementNodes(); if (siblingElementIndex == -1) { for (int i = siblingIndex - 1; i >= 0; i--) { Node sibling = parentNode.childNodes.get(i); if (sibling.getNodeType() == NodeType.ELEMENT) { return sibling; } } return null; } int index = siblingElementIndex - 1; if (index < 0) { return null; } return parentNode.childElementNodes[index]; }
/** * Returns this node's next <b>element</b>. */ public Node getNextSiblingElement() { parentNode.initChildElementNodes(); if (siblingElementIndex == -1) { int max = parentNode.getChildNodesCount(); for (int i = siblingIndex; i < max; i++) { Node sibling = parentNode.childNodes.get(i); if (sibling.getNodeType() == NodeType.ELEMENT) { return sibling; } } return null; } int index = siblingElementIndex + 1; if (index >= parentNode.childElementNodesCount) { return null; } return parentNode.childElementNodes[index]; }
/** * Returns a child element node at given index. * If index is out of bounds, <code>null</code> is returned. */ public Element getChildElement(int index) { initChildElementNodes(); if ((index < 0) || (index >= childElementNodes.length)) { return null; } return childElementNodes[index]; }
/** * Returns last child <b>element</b> node or * <code>null</code> if no such child node exist. */ public Element getLastChildElement() { initChildElementNodes(); if (childElementNodes.length == 0) { return null; } return childElementNodes[childElementNodes.length - 1]; }
/** * Returns a child element node at given index. * If index is out of bounds, <code>null</code> is returned. */ public Element getChildElement(final int index) { initChildElementNodes(); if ((index < 0) || (index >= childElementNodes.length)) { return null; } return childElementNodes[index]; }
/** * Returns a child element node at given index. */ public Node getChildElement(int index) { initChildElementNodes(); if ((index < 0) || (index >= childElementNodes.length)) { return null; } return childElementNodes[index]; }
/** * Returns first child <b>element</b> node or * <code>null</code> if no element children exist. */ public Element getFirstChildElement() { initChildElementNodes(); if (childElementNodes.length == 0) { return null; } return childElementNodes[0]; }
/** * Returns last child <b>element</b> node or * <code>null</code> if no such child node exist. */ public Node getLastChildElement() { initChildElementNodes(); if (childElementNodes.length == 0) { return null; } return childElementNodes[childElementNodes.length - 1]; }
/** * Returns first child <b>element</b> node or * <code>null</code> if no element children exist. */ public Node getFirstChildElement() { initChildElementNodes(); if (childElementNodes.length == 0) { return null; } return childElementNodes[0]; }
/** * Returns last child <b>element</b> node or * <code>null</code> if no such child node exist. */ public Element getLastChildElement() { initChildElementNodes(); if (childElementNodes.length == 0) { return null; } return childElementNodes[childElementNodes.length - 1]; }
/** * Returns first child <b>element</b> node or * <code>null</code> if no element children exist. */ public Element getFirstChildElement() { initChildElementNodes(); if (childElementNodes.length == 0) { return null; } return childElementNodes[0]; }
/** * Returns an array of all children elements. */ public Element[] getChildElements() { initChildElementNodes(); return childElementNodes.clone(); }
/** * Returns an array of all children elements. */ public Element[] getChildElements() { initChildElementNodes(); return childElementNodes.clone(); }
/** * Returns an array of all children elements. */ public Node[] getChildElements() { initChildElementNodes(); return childElementNodes.clone(); }
/** * Returns this node's previous sibling of <b>element</b> type * or <code>null</code> if this is the first sibling. */ public Node getPreviousSiblingElement() { parentNode.initChildElementNodes(); if (siblingElementIndex == -1) { for (int i = siblingIndex - 1; i >= 0; i--) { Node sibling = parentNode.childNodes.get(i); if (sibling.getNodeType() == NodeType.ELEMENT) { return sibling; } } return null; } int index = siblingElementIndex - 1; if (index < 0) { return null; } return parentNode.childElementNodes[index]; }
/** * Returns this node's previous sibling of <b>element</b> type * or <code>null</code> if this is the first sibling. */ public Node getPreviousSiblingElement() { parentNode.initChildElementNodes(); if (siblingElementIndex == -1) { for (int i = siblingIndex - 1; i >= 0; i--) { Node sibling = parentNode.childNodes.get(i); if (sibling.getNodeType() == NodeType.ELEMENT) { return sibling; } } return null; } int index = siblingElementIndex - 1; if (index < 0) { return null; } return parentNode.childElementNodes[index]; }