本文整理了Java中org.w3c.dom.Document.hasChildNodes()
方法的一些代码示例,展示了Document.hasChildNodes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Document.hasChildNodes()
方法的具体详情如下:
包路径:org.w3c.dom.Document
类名称:Document
方法名:hasChildNodes
暂无
代码示例来源:origin: org.apache.axis2/axis2-saaj
/**
* 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();
}
代码示例来源:origin: org.swinglabs/swingx-ws
/**
* @inheritDoc
*/
public boolean hasChildNodes() {
return dom.hasChildNodes();
}
代码示例来源:origin: axis/axis
public boolean hasChildNodes(){
return document.hasChildNodes();
}
public Node cloneNode(boolean deep) {
代码示例来源:origin: apache/axis2-java
/**
* 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();
}
代码示例来源:origin: org.apache.axis/axis
public boolean hasChildNodes(){
return document.hasChildNodes();
}
public Node cloneNode(boolean deep) {
代码示例来源:origin: org.opensingular/singular-commons
@Override
public boolean hasChildNodes() {
return original_.hasChildNodes();
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
public boolean hasChildNodes()
{
return this.doc.hasChildNodes();
}
代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis
public boolean hasChildNodes(){
return document.hasChildNodes();
}
public Node cloneNode(boolean deep) {
代码示例来源:origin: org.opensingular/form-core
@Override
public boolean hasChildNodes() {
return original_.hasChildNodes();
}
代码示例来源:origin: pentaho/modeler
@Override public boolean isEmptyModel() {
return !mondrianSchema.hasChildNodes();
}
};
代码示例来源:origin: org.objectweb.celtix/celtix-rt
public boolean hasChildNodes() {
return this.root.hasChildNodes();
}
代码示例来源:origin: org.metawidget.modules/metawidget-core
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;
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
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;
}
}
代码示例来源:origin: com.ibm.sbt/com.ibm.commons.xml
/**
* 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());
}
}
代码示例来源:origin: mertakdut/EpubParser
private void parseOpfFile(Document document, Package pckage) throws ReadingException {
if (document.hasChildNodes()) {
isFoundNeeded = false;
traverseDocumentNodesAndFillContent(document.getChildNodes(), pckage);
}
}
代码示例来源:origin: org.objectweb.celtix/celtix-rt
private void buildFaultMessage(XMLMessage message, Document doc) {
assert doc != null;
if (doc.hasChildNodes()) {
doBuild(message, doc);
}
}
代码示例来源:origin: mertakdut/EpubParser
private void parseTocFile(Document document, Toc toc) throws ReadingException {
if (document.hasChildNodes()) {
isFoundNeeded = false;
traverseDocumentNodesAndFillContent(document.getChildNodes(), toc);
}
}
代码示例来源:origin: org.lorislab.corn/corn
@Override
public boolean isEmpty() {
return document == null && (document.hasAttributes() || document.hasChildNodes());
}
代码示例来源:origin: com.struqt/invar-core
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;
}
代码示例来源:origin: com.marklogic/client-api-java
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 {
内容来源于网络,如有侵权,请联系作者删除!