本文整理了Java中org.xmlpull.v1.builder.XmlElement.setParent()
方法的一些代码示例,展示了XmlElement.setParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlElement.setParent()
方法的具体详情如下:
包路径:org.xmlpull.v1.builder.XmlElement
类名称:XmlElement
方法名:setParent
[英]Method setParent
[中]方法setParent
代码示例来源:origin: xpp3/xpp3
private void setChildParent(Object child) {
if(child instanceof XmlElement) {
XmlElement elChild = (XmlElement) child;
elChild.setParent(this);
}
}
代码示例来源:origin: org.ogce/xpp3
private void setChildParent(Object child) {
if(child instanceof XmlElement) {
XmlElement elChild = (XmlElement) child;
elChild.setParent(this);
}
}
代码示例来源:origin: xpp3/xpp3
private XmlElement fixElementParent(XmlElement el) {
el.setParent(this);
return el;
}
代码示例来源:origin: org.ogce/xpp3
private XmlElement fixElementParent(XmlElement el) {
el.setParent(this);
return el;
}
代码示例来源:origin: xpp3/xpp3
private void fixImportedChildParent(Object child) {
if(child instanceof XmlElement) {
XmlElement childEl = (XmlElement) child;
XmlContainer childElParent = childEl.getParent();
if(childElParent == target) {
childEl.setParent(this);
}
}
}
代码示例来源:origin: org.ogce/xpp3
private void fixImportedChildParent(Object child) {
if(child instanceof XmlElement) {
XmlElement childEl = (XmlElement) child;
XmlContainer childElParent = childEl.getParent();
if(childElParent == target) {
childEl.setParent(this);
}
}
}
代码示例来源:origin: xpp3/xpp3
private void fixImportedChildParent(Object child) {
if(child instanceof XmlElement) {
XmlElement childEl = (XmlElement) child;
XmlContainer childElParent = childEl.getParent();
if(childElParent == target) {
childEl.setParent(this);
}
}
}
代码示例来源:origin: org.ogce/xpp3
private void fixImportedChildParent(Object child) {
if(child instanceof XmlElement) {
XmlElement childEl = (XmlElement) child;
XmlContainer childElParent = childEl.getParent();
if(childElParent == target) {
childEl.setParent(this);
}
}
}
代码示例来源:origin: xpp3/xpp3
/**
*/
public void setDocumentElement(XmlElement rootElement) {
// replace with existing root element
int pos = findDocumentElement();
if(pos >= 0) {
children.set(pos, rootElement);
} else {
children.add(rootElement);
}
this.root = rootElement;
rootElement.setParent(this);
//TOOD: nice assertion that htere is only one XmlElement in children ...
}
代码示例来源:origin: org.ogce/xpp3
/**
*/
public void setDocumentElement(XmlElement rootElement) {
// replace with existing root element
int pos = findDocumentElement();
if(pos >= 0) {
children.set(pos, rootElement);
} else {
children.add(rootElement);
}
this.root = rootElement;
rootElement.setParent(this);
//TOOD: nice assertion that htere is only one XmlElement in children ...
}
代码示例来源:origin: xpp3/xpp3
public Object clone() throws CloneNotSupportedException{
XmlDocumentImpl cloned = (XmlDocumentImpl) super.clone();
// now do deep clone
cloned.root = null;
cloned.children = cloneList(cloned, children);
int pos = cloned.findDocumentElement();
if(pos >= 0) {
cloned.root = (XmlElement) cloned.children.get(pos);
cloned.root.setParent(cloned);
}
return cloned;
}
代码示例来源:origin: org.ogce/xpp3
public Object clone() throws CloneNotSupportedException{
XmlDocumentImpl cloned = (XmlDocumentImpl) super.clone();
// now do deep clone
cloned.root = null;
cloned.children = cloneList(cloned, children);
int pos = cloned.findDocumentElement();
if(pos >= 0) {
cloned.root = (XmlElement) cloned.children.get(pos);
cloned.root.setParent(cloned);
}
return cloned;
}
内容来源于网络,如有侵权,请联系作者删除!