本文整理了Java中org.dom4j.Attribute.isReadOnly()
方法的一些代码示例,展示了Attribute.isReadOnly()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.isReadOnly()
方法的具体详情如下:
包路径:org.dom4j.Attribute
类名称:Attribute
方法名:isReadOnly
暂无
代码示例来源:origin: org.dom4j/dom4j
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.dom4j/dom4j
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: maven/dom4j
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: dom4j/dom4j
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: dom4j/dom4j
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: apache/servicemix-bundles
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: maven/dom4j
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
public Element addAttribute(QName qName, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(qName);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, qName, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, qName, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
代码示例来源:origin: apache/servicemix-bundles
public Element addAttribute(String name, String value) {
// adding a null value is equivalent to removing the attribute
Attribute attribute = attribute(name);
if (value != null) {
if (attribute == null) {
add(getDocumentFactory().createAttribute(this, name, value));
} else if (attribute.isReadOnly()) {
remove(attribute);
add(getDocumentFactory().createAttribute(this, name, value));
} else {
attribute.setValue(value);
}
} else if (attribute != null) {
remove(attribute);
}
return this;
}
内容来源于网络,如有侵权,请联系作者删除!