org.dom4j.Element.getDocument()方法的使用及代码示例

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

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

Element.getDocument介绍

暂无

代码示例

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

代码示例来源:origin: pentaho/pentaho-kettle

data.document = row.getDocument();

代码示例来源:origin: pentaho/pentaho-kettle

path.getCurrent().getDocument().detach(); // trick to stop reader
return;

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

public Document getDocument() {
  Element element = getParent();
  return (element != null) ? element.getDocument() : null;
}

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

public Attribute createAttribute(Element owner, QName qname, String value) {
  if (autoLoadSchema && qname.equals(XSI_NO_SCHEMA_LOCATION)) {
    Document document = (owner != null) ? owner.getDocument() : null;
    loadSchema(document, value);
  } else if (autoLoadSchema && qname.equals(XSI_SCHEMA_LOCATION)) {
    Document document = (owner != null) ? owner.getDocument() : null;
    String uri = value.substring(0, value.indexOf(' '));
    Namespace namespace = owner.getNamespaceForURI(uri);
    loadSchema(document, value.substring(value.indexOf(' ') + 1),
        namespace);
  }
  return super.createAttribute(owner, qname, value);
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

public Document getDocument() {
  if (parentBranch instanceof Document) {
    return (Document) parentBranch;
  } else if (parentBranch instanceof Element) {
    Element parent = (Element) parentBranch;
    return parent.getDocument();
  }
  return null;
}

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

modifiedElement.setDocument(origElement.getDocument());
  modifiedElement.setDocument(origElement.getDocument());
  Document doc = origElement.getDocument();
  doc.setRootElement(modifiedElement);

代码示例来源:origin: com.haulmont.cuba/cuba-gui

protected Document createDocument(String template, Map<String, Object> params) {
    Document originalDocument = screenXmlParser.parseDescriptor(template);

    XmlInheritanceProcessor processor = beanLocator.getPrototype(XmlInheritanceProcessor.NAME,
        originalDocument, params);
    Element resultRoot = processor.getResultRoot();

    return resultRoot.getDocument();
  }
}

代码示例来源:origin: com.haulmont.cuba/cuba-gui

@Override
public void setSettings(Presentation p, Element e) {
  p = getPresentation(p.getId());
  if (p != null) {
    p.setXml(Dom4j.writeDocument(e.getDocument(), false));
    modify(p);
  }
}

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

protected void testElementClone(Element element) throws Exception {
    Element element2 = (Element) element.clone();

    assertTrue("Returned a new Element", element2 != element);
    assertNull("New element has no parent", element2.getParent());
    assertNull("New element has no Document", element2.getDocument());

    assertTrue("Element fragments are equal", comparator.compare(element,
        element2) == 0);
  }
}

相关文章

Element类方法