org.dom4j.dom.DOMDocument.addElement()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中org.dom4j.dom.DOMDocument.addElement()方法的一些代码示例,展示了DOMDocument.addElement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DOMDocument.addElement()方法的具体详情如下:
包路径:org.dom4j.dom.DOMDocument
类名称:DOMDocument
方法名:addElement

DOMDocument.addElement介绍

暂无

代码示例

代码示例来源:origin: org.dom4j/dom4j

public org.w3c.dom.Document createDocument(String namespaceURI,
    String qualifiedName, org.w3c.dom.DocumentType docType)
    throws org.w3c.dom.DOMException {
  DOMDocument document;
  if (docType != null) {
    DOMDocumentType documentType = asDocumentType(docType);
    document = new DOMDocument(documentType);
  } else {
    document = new DOMDocument();
  }
  document.addElement(createQName(qualifiedName, namespaceURI));
  return document;
}

代码示例来源:origin: dom4j/dom4j

public org.w3c.dom.Document createDocument(String namespaceURI,
    String qualifiedName, org.w3c.dom.DocumentType docType)
    throws org.w3c.dom.DOMException {
  DOMDocument document;
  if (docType != null) {
    DOMDocumentType documentType = asDocumentType(docType);
    document = new DOMDocument(documentType);
  } else {
    document = new DOMDocument();
  }
  document.addElement(createQName(qualifiedName, namespaceURI));
  return document;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j

public org.w3c.dom.Document createDocument(String namespaceURI,
    String qualifiedName, org.w3c.dom.DocumentType docType)
    throws org.w3c.dom.DOMException {
  DOMDocument document;
  if (docType != null) {
    DOMDocumentType documentType = asDocumentType(docType);
    document = new DOMDocument(documentType);
  } else {
    document = new DOMDocument();
  }
  document.addElement(createQName(qualifiedName, namespaceURI));
  return document;
}

代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand

public org.w3c.dom.Document createDocument(String namespaceURI,
    String qualifiedName, org.w3c.dom.DocumentType docType)
    throws org.w3c.dom.DOMException {
  DOMDocument document;
  if (docType != null) {
    DOMDocumentType documentType = asDocumentType(docType);
    document = new DOMDocument(documentType);
  } else {
    document = new DOMDocument();
  }
  document.addElement(createQName(qualifiedName, namespaceURI));
  return document;
}

代码示例来源:origin: org.dom4j/com.springsource.org.dom4j

public org.w3c.dom.Document createDocument(String namespaceURI,
    String qualifiedName, org.w3c.dom.DocumentType docType)
    throws org.w3c.dom.DOMException {
  DOMDocument document;
  if (docType != null) {
    DOMDocumentType documentType = asDocumentType(docType);
    document = new DOMDocument(documentType);
  } else {
    document = new DOMDocument();
  }
  document.addElement(createQName(qualifiedName, namespaceURI));
  return document;
}

代码示例来源:origin: maven/dom4j

public org.w3c.dom.Document createDocument(String namespaceURI,
    String qualifiedName, org.w3c.dom.DocumentType docType)
    throws org.w3c.dom.DOMException {
  DOMDocument document;
  if (docType != null) {
    DOMDocumentType documentType = asDocumentType(docType);
    document = new DOMDocument(documentType);
  } else {
    document = new DOMDocument();
  }
  document.addElement(createQName(qualifiedName, namespaceURI));
  return document;
}

代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j

public org.w3c.dom.Document createDocument(String namespaceURI,
    String qualifiedName, org.w3c.dom.DocumentType docType)
    throws org.w3c.dom.DOMException {
  DOMDocument document;
  if (docType != null) {
    DOMDocumentType documentType = asDocumentType(docType);
    document = new DOMDocument(documentType);
  } else {
    document = new DOMDocument();
  }
  document.addElement(createQName(qualifiedName, namespaceURI));
  return document;
}

代码示例来源:origin: apache/servicemix-bundles

public org.w3c.dom.Document createDocument(String namespaceURI,
    String qualifiedName, org.w3c.dom.DocumentType docType)
    throws org.w3c.dom.DOMException {
  DOMDocument document;
  if (docType != null) {
    DOMDocumentType documentType = asDocumentType(docType);
    document = new DOMDocument(documentType);
  } else {
    document = new DOMDocument();
  }
  document.addElement(createQName(qualifiedName, namespaceURI));
  return document;
}

代码示例来源:origin: dom4j/dom4j

public void testBug1148333() {
  DOMDocumentFactory factory = (DOMDocumentFactory) DOMDocumentFactory
      .getInstance();
  DOMDocument doc = (DOMDocument) factory.createDocument();
  Element el = doc.addElement("root");
  el.addNamespace("pref2", "uri2");
  DOMDocument clone = (DOMDocument) doc.cloneNode(true);
  
  assertNotSame(doc, clone);
  assertNodesEqual(doc, clone);
}

相关文章