org.xmlpull.v1.builder.XmlElement.setParent()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(109)

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

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;
}

相关文章