/** * Returns whether the given node has any element children. * * @param elt The node to check. * @return Returns <code>true</code> if this node has any children, * <code>false</code> otherwise. */ private boolean hasChildElements(Node elt) { return getFirstChild(elt) != null; }
/** * Return the next element sibling found from the given Node. * * @param elt The Node start point. * @return The next sibling Element, or null if nto found. */ private Element getNextSibling(Node elt) { return getFirstFoundElement(elt.getNextSibling()); }
Element elt = getFirstChild(result.getNode()); boolean end = false; Stack<Element> stack = new Stack<Element>(); if (hasChildElements(elt)) applyLN(elt); elt = getFirstChild(elt); // go down applyLN(elt); Element sibling = getNextSibling(elt); if (sibling != null) elt = getNextSibling(elt);
filter.applyLN(result); if (e.getLocator() == null && filter.getDocumentLocator() != null) Locator locator = filter.getDocumentLocator(); extraInfos += " at line " + locator.getLineNumber() + ", column " + locator.getColumnNumber();
filter = new LineNumberFilter(xmlReader);
/** * Return the first element child found from the given Node. * * @param elt The Node start point. * @return The first child Element found, or null. */ private Element getFirstChild(Node elt) { return getFirstFoundElement(elt.getFirstChild()); }