本文整理了Java中org.dom4j.Element.detach()
方法的一些代码示例,展示了Element.detach()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.detach()
方法的具体详情如下:
包路径:org.dom4j.Element
类名称:Element
方法名:detach
暂无
代码示例来源:origin: Tencent/tinker
final List<Element> incActivityNodes = getIncrementActivityNodes(packageName, newActivityNodes, incActivities);
for (Element node : incActivityNodes) {
incAppNode.add(node.detach());
final List<Element> incServiceNodes = getIncrementServiceNodes(packageName, newServiceNodes, incServices);
for (Element node : incServiceNodes) {
incAppNode.add(node.detach());
final List<Element> incReceiverNodes = getIncrementReceiverNodes(packageName, newReceiverNodes, incReceivers);
for (Element node : incReceiverNodes) {
incAppNode.add(node.detach());
final List<Element> incProviderNodes = getIncrementProviderNodes(packageName, newProviderNodes, incProviders);
for (Element node : incProviderNodes) {
incAppNode.add(node.detach());
代码示例来源:origin: igniterealtime/Openfire
data.detach();
final Element item = DocumentHelper.createElement( "item" );
item.addAttribute( "id", "current" );
代码示例来源:origin: pentaho/pentaho-kettle
row.detach();
if ( log.isDebug() ) {
logDebug( BaseMessages.getString( PKG, "GetXMLData.Log.StreamingMode.EndProcessing" ) );
代码示例来源:origin: igniterealtime/Openfire
Element fieldToRemove = userVCard.element(field.getName());
if (fieldToRemove != null) {
fieldToRemove.detach();
代码示例来源:origin: org.dom4j/dom4j
public void onEnd(ElementPath elementPath) {
Element elem = elementPath.getCurrent();
elem.detach();
elem = null;
}
}
代码示例来源:origin: org.dom4j/dom4j
public void onEnd(ElementPath elementPath) {
super.onEnd(elementPath);
if (getActiveHandlerCount() == 0) {
elementPath.getCurrent().detach();
}
}
}
代码示例来源:origin: org.dom4j/dom4j
public void onEnd(ElementPath elementPath) {
try {
org.dom4j.Element elem = elementPath.getCurrent();
javax.xml.bind.Element jaxbObject
= (javax.xml.bind.Element) jaxbReader.unmarshal(elem);
if (jaxbReader.isPruneElements()) {
elem.detach();
}
handler.handleObject(jaxbObject);
} catch (Exception ex) {
throw new JAXBRuntimeException(ex);
}
}
}
代码示例来源:origin: org.dom4j/dom4j
origElement.detach();
} else {
if (origElement.isRootElement()) {
origElement.detach();
代码示例来源:origin: dom4j/dom4j
public void onEnd(ElementPath elementPath) {
Element elem = elementPath.getCurrent();
elem.detach();
elem = null;
}
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
public void onEnd(ElementPath elementPath) {
Element elem = elementPath.getCurrent();
elem.detach();
elem = null;
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public Node detach() {
if (parent!=null) {
parent.remove(this);
parent = null;
}
return element.detach();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public Node detach() {
if (parent!=null) {
parent.remove(this);
parent = null;
}
return element.detach();
}
代码示例来源:origin: com.gitee.rslai.base.tool/servertest
private Element clearChildren(Element instruction) {
Iterator iterator = instruction.elementIterator();
while (iterator.hasNext()) {
Element next = (Element) iterator.next();
next.detach();
}
return instruction;
}
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public void set(Object target, Object value, SessionFactoryImplementor factory)
throws HibernateException {
if (value!=CollectionType.UNFETCHED_COLLECTION) {
Element owner = ( Element ) target;
Element existing = owner.element(elementName);
if (existing!=null) existing.detach();
if (value!=null) {
Element element = owner.addElement(elementName);
super.propertyType.setToXMLNode(element, value, factory);
}
}
}
代码示例来源:origin: dom4j/dom4j
public void onEnd(ElementPath elementPath) {
super.onEnd(elementPath);
if (getActiveHandlerCount() == 0) {
elementPath.getCurrent().detach();
}
}
}
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
public void onEnd(ElementPath elementPath) {
super.onEnd(elementPath);
if (getActiveHandlerCount() == 0) {
elementPath.getCurrent().detach();
}
}
}
代码示例来源:origin: USPTO/PatentPublicData
public void onEnd(ElementPath path) {
Element el = path.getCurrent();
Element parent = el.getParent();
parent.addElement(el.getName()).setText("Note: This field was truncated from the Large XML Document.");
//System.err.println("Large Field truncated '"+ el.getName() +"' which has content node(s) -> " + el.content().size());
el.detach();
}
};
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
protected static void replaceNode(Node container, Element value) {
if ( container!=value ) { //not really necessary, I guess...
Element parent = container.getParent();
container.detach();
value.setName( container.getName() );
value.detach();
parent.add(value);
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
protected static void replaceNode(Node container, Element value) {
if ( container!=value ) { //not really necessary, I guess...
Element parent = container.getParent();
container.detach();
value.setName( container.getName() );
value.detach();
parent.add(value);
}
}
代码示例来源:origin: dom4j/dom4j
public void testBug770410() {
Document doc = DocumentHelper.createDocument();
Element a = doc.addElement("a");
Element b = a.addElement("b");
Element c = b.addElement("c");
b.detach();
String relativePath = b.getPath(b);
assertSame(b, b.selectSingleNode(relativePath));
}
内容来源于网络,如有侵权,请联系作者删除!