/** * Returns whether this node has any children. * * @return <code>true</code> if this node has any children, <code>false</code> otherwise. */ public boolean hasChildNodes() { return document.hasChildNodes(); }
/** * @inheritDoc */ public boolean hasChildNodes() { return dom.hasChildNodes(); }
public boolean hasChildNodes(){ return document.hasChildNodes(); } public Node cloneNode(boolean deep) {
/** * Returns whether this node has any children. * * @return <code>true</code> if this node has any children, <code>false</code> otherwise. */ public boolean hasChildNodes() { return document.hasChildNodes(); }
public boolean hasChildNodes(){ return document.hasChildNodes(); } public Node cloneNode(boolean deep) {
@Override public boolean hasChildNodes() { return original_.hasChildNodes(); }
public boolean hasChildNodes() { return this.doc.hasChildNodes(); }
public boolean hasChildNodes(){ return document.hasChildNodes(); } public Node cloneNode(boolean deep) {
@Override public boolean hasChildNodes() { return original_.hasChildNodes(); }
@Override public boolean isEmptyModel() { return !mondrianSchema.hasChildNodes(); } };
public boolean hasChildNodes() { return this.root.hasChildNodes(); }
protected Document combineInspectionResult( Document masterDocument, Document inspectionDocument ) { // Short circuit... if ( inspectionDocument == null || !inspectionDocument.hasChildNodes() ) { return masterDocument; } if ( masterDocument == null || !masterDocument.hasChildNodes() ) { return inspectionDocument; } // ...or full combine XmlUtils.combineElements( masterDocument.getDocumentElement(), inspectionDocument.getDocumentElement(), TYPE, NAME ); return masterDocument; } }
protected Document combineInspectionResult( Document masterDocument, Document inspectionDocument ) { // Short circuit... if ( inspectionDocument == null || !inspectionDocument.hasChildNodes() ) { return masterDocument; } if ( masterDocument == null || !masterDocument.hasChildNodes() ) { return inspectionDocument; } // ...or full combine XmlUtils.combineElements( masterDocument.getDocumentElement(), inspectionDocument.getDocumentElement(), TYPE, NAME ); return masterDocument; } }
/** * Clear all of the content from the specified document * @param doc */ public static void clearDocument(Document doc) { if (doc == null) { return; } while (doc.hasChildNodes()) { doc.removeChild(doc.getFirstChild()); } }
private void parseOpfFile(Document document, Package pckage) throws ReadingException { if (document.hasChildNodes()) { isFoundNeeded = false; traverseDocumentNodesAndFillContent(document.getChildNodes(), pckage); } }
private void buildFaultMessage(XMLMessage message, Document doc) { assert doc != null; if (doc.hasChildNodes()) { doBuild(message, doc); } }
private void parseTocFile(Document document, Toc toc) throws ReadingException { if (document.hasChildNodes()) { isFoundNeeded = false; traverseDocumentNodesAndFillContent(document.getChildNodes(), toc); } }
@Override public boolean isEmpty() { return document == null && (document.hasAttributes() || document.hasChildNodes()); }
private Document getSnippetDoc(String path/*, InvarContext ctx*/) throws Exception { InputStream stream = getSnippetStream(path); if (stream == null) { System.out.println("error X---------> " + path); return null; } InputSource input = new InputSource(stream); Document doc = DocumentBuilderFactory.newInstance() .newDocumentBuilder() .parse(input); if (!doc.hasChildNodes()) return null; System.out.println("read <- " + path); return doc; }
public void serializeDocument(Document document) throws XMLStreamException { String encoding = document.getInputEncoding(); String version = document.getXmlVersion(); if (encoding != null) { serializer.writeStartDocument(encoding, version); } else { serializer.writeStartDocument(version); } if (document.hasChildNodes()) { serializeNodeList(document.getChildNodes()); } serializer.writeEndDocument(); } public void serializeElement(Element element) throws XMLStreamException {