/** * @inheritDoc */ public Node getLastChild() { return dom.getLastChild(); }
public Node getLastChild() { return this.doc.getLastChild(); }
@Override public Node getLastChild() { return original_.getLastChild(); }
@Override public Node getLastChild() { return findIfPresent(document.getLastChild()); }
@Override public Node getLastChild() { return original_.getLastChild(); }
public Node getLastChild(){ return document.getLastChild(); }
public Node getLastChild(){ return document.getLastChild(); }
public Node getLastChild(){ return document.getLastChild(); }
private Element resolveElement(Object object) { Element element = null; if (object instanceof Document) { element = (Element) ((Document) object).getLastChild(); } else if (object instanceof Element) { element = (Element) object; } else { throw new ProbeException("An unknown object type was passed to DomProbe. Must be a Document."); } return element; }
private Element resolveElement(Object object) { Element element = null; if (object instanceof Document) { element = (Element) ((Document) object).getLastChild(); } else if (object instanceof Element) { element = (Element) object; } else { throw new ProbeException("An unknown object type was passed to DomProbe. Must be a Document."); } return element; }
public void writeStartDocument() throws XMLStreamException { if (result != root) { throw new XMLStreamException("Result node is not the Document"); } // remove all child nodes to reset the document Node child; while ((child = root.getLastChild()) != null) { root.removeChild(child); } namespaceContext = null; }
/** The last child of this node. If there is no such node, this returns <code>null</code>. */ public Node getLastChild() { return toSAAJNode(document.getLastChild()); }
/** The last child of this node. If there is no such node, this returns <code>null</code>. */ public Node getLastChild() { return toSAAJNode(document.getLastChild()); }
protected void runTest() throws Throwable { Document doc = dbf.newDocumentBuilder().parse(new InputSource(new StringReader(" <!-- --> <root/> "))); Node child = doc.getFirstChild(); do { assertThat(child).isNotInstanceOf(Text.class); child = child.getNextSibling(); } while (child != null); child = doc.getLastChild(); do { assertThat(child).isNotInstanceOf(Text.class); child = child.getPreviousSibling(); } while (child != null); NodeList children = doc.getChildNodes(); assertThat(children.getLength()).isEqualTo(2); assertThat(children.item(1)).isSameAs(doc.getDocumentElement()); } }
/** * Begins parsing from the provided Reader. */ public void parse(Reader reader) throws NodeletException { try { Document doc = createDocument(reader); parse(doc.getLastChild()); } catch (Exception e) { throw new NodeletException("Error parsing XML. Cause: " + e, e); } }
/** * Begins parsing from the provided Reader. */ public void parse(Reader reader) throws NestedIOException { try { Document doc = createDocument(reader); parse(doc.getLastChild()); } catch (Exception e) { throw new NestedIOException("Error parsing XML. Cause: " + e, e); } }
public void parse(InputStream inputStream) throws NodeletException { try { Document doc = createDocument(inputStream); parse(doc.getLastChild()); } catch (Exception e) { throw new NodeletException("Error parsing XML. Cause: " + e, e); } }
/** * Begins parsing from the provided Reader. */ public void parse(Reader reader) throws NodeletException { try { Document doc = createDocument(reader); parse(doc.getLastChild()); } catch (Exception e) { throw new NodeletException("Error parsing XML. Cause: " + e, e); } }
public void parse(InputStream inputStream) throws NodeletException { try { Document doc = createDocument(inputStream); parse(doc.getLastChild()); } catch (Exception e) { throw new NodeletException("Error parsing XML. Cause: " + e, e); } }
public void parse(InputStream inputStream) throws NestedIOException { try { Document doc = createDocument(inputStream); parse(doc.getLastChild()); } catch (Exception e) { throw new NestedIOException("Error parsing XML. Cause: " + e, e); } }