本文整理了Java中org.jdom2.Attribute.detach()
方法的一些代码示例,展示了Attribute.detach()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.detach()
方法的具体详情如下:
包路径:org.jdom2.Attribute
类名称:Attribute
方法名:detach
[英]Detach this Attribute from its parent.
[中]将此属性与其父属性分离。
代码示例来源:origin: org.mycore/mycore-xeditor
public static MCRChangeData remove(Attribute attribute) {
MCRChangeData data = new MCRChangeData("removed-attribute", attribute);
attribute.detach();
return data;
}
代码示例来源:origin: org.mycore/mycore-xeditor
public Attribute text2attribute(String text) {
String xtext = "<x " + text + " />";
return text2element(xtext).getAttributes().get(0).detach();
}
}
代码示例来源:origin: org.codehaus.izpack/izpack-util
/**
* Adds attributes from in element to out element.
*
* @param out out element
* @param in in element
*/
private void addAttributes(Element out, Element in)
{
LinkedHashMap<String, Attribute> allAttributes = new LinkedHashMap<String, Attribute>();
List<Attribute> outAttributes = new ArrayList<Attribute>(out.getAttributes());
List<Attribute> inAttributes = new ArrayList<Attribute>(in.getAttributes());
for (Attribute attr : outAttributes)
{
attr.detach();
allAttributes.put(attr.getQualifiedName(), attr);
logger.fine("adding attr from out:" + attr);
}
for (Attribute attr : inAttributes)
{
attr.detach();
allAttributes.put(attr.getQualifiedName(), attr);
logger.fine("adding attr from in:" + attr);
}
out.setAttributes(new ArrayList<Attribute>(allAttributes.values()));
}
代码示例来源:origin: org.codehaus.izpack/izpack-util
/**
* Adds attributes from in element to out element.
*
* @param out out element
* @param in in element
*/
private void addAttributes(Element out, Element in)
{
LinkedHashMap<String, Attribute> allAttributes = new LinkedHashMap<String, Attribute>();
List<Attribute> outAttributes = new ArrayList<Attribute>(out.getAttributes());
List<Attribute> inAttributes = new ArrayList<Attribute>(in.getAttributes());
for (Attribute attr : outAttributes)
{
attr.detach();
allAttributes.put(attr.getQualifiedName(), attr);
logger.fine("adding attr from out:" + attr);
}
for (Attribute attr : inAttributes)
{
attr.detach();
allAttributes.put(attr.getQualifiedName(), attr);
logger.fine("adding attr from in:" + attr);
}
out.setAttributes(new ArrayList<Attribute>(allAttributes.values()));
}
代码示例来源:origin: org.apache.jspwiki/jspwiki-main
titleAttr.detach();
代码示例来源:origin: io.wcm.tooling.commons/io.wcm.tooling.commons.crx-packmgr-helper
attribute.detach();
excluded = true;
String filteredValue = filterMixinsPropertyValue(attribute.getValue(), namespacePrefixesActuallyUsed);
if (StringUtils.isBlank(filteredValue)) {
attribute.detach();
内容来源于网络,如有侵权,请联系作者删除!