本文整理了Java中nu.xom.Attribute.setType()
方法的一些代码示例,展示了Attribute.setType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.setType()
方法的具体详情如下:
包路径:nu.xom.Attribute
类名称:Attribute
方法名:setType
[英]Sets the type of this attribute to one of the ten DTD types or Type.UNDECLARED
.
[中]将此属性的类型设置为十种DTD类型之一或Type.UNDECLARED
。
代码示例来源:origin: pierre/meteo
this.setType(Attribute.Type.ID);
代码示例来源:origin: pierre/meteo
/**
* <p>
* Sets the local name of the attribute.
* </p>
*
* @param localName the new local name
*
* @throws IllegalNameException if <code>localName</code>
* is not a namespace well-formed, non-colonized name
*
*/
public void setLocalName(String localName) {
if ("id".equals(localName) &&
"http://www.w3.org/XML/1998/namespace".equals(this.URI)) {
Verifier.checkNCName(this.value);
}
_setLocalName(localName);
if (isXMLID()) {
this.setType(Attribute.Type.ID);
}
}
代码示例来源:origin: sanity/tahrir
private static Element generatePlainTextElement(final String plaintextBroadcastMessage, final IdentityStore identityStore, String languageCode) {
Attribute language = new Attribute("lang", languageCode);
language.setType(Attribute.Type.CDATA);
Element plainText = new Element(TrConstants.FormatInfo.PLAIN_TEXT);
plainText.addAttribute(language);
代码示例来源:origin: teiid/teiid
if (attr.getType() != type) attr.setType(type);
attr.setValue(value);
return attr;
代码示例来源:origin: org.teiid/saxon-xom
if (attr.getType() != type) attr.setType(type);
attr.setValue(value);
return attr;
内容来源于网络,如有侵权,请联系作者删除!