本文整理了Java中org.jdom.Attribute.setNamespace()
方法的一些代码示例,展示了Attribute.setNamespace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.setNamespace()
方法的具体详情如下:
包路径:org.jdom.Attribute
类名称:Attribute
方法名:setNamespace
[英]This sets this Attribute
's Namespace
. If the provided namespace is null, the attribute will have no namespace. The namespace must have a prefix.
[中]这将设置此Attribute
的Namespace
。如果提供的名称空间为null,则该属性将没有名称空间。命名空间必须具有前缀。
代码示例来源:origin: org.jdom/jdom-legacy
/**
* This will create a new <code>Attribute</code> with the
* specified (local) name, value, and type, and in the provided
* <code>{@link Namespace}</code>.
*
* @param name <code>String</code> name of <code>Attribute</code>.
* @param value <code>String</code> value for new attribute.
* @param type <code>int</code> type for new attribute.
* @param namespace <code>Namespace</code> namespace for new attribute.
* @throws IllegalNameException if the given name is illegal as an
* attribute name or if if the new namespace is the default
* namespace. Attributes cannot be in a default namespace.
* @throws IllegalDataException if the given attribute value is
* illegal character data (as determined by
* {@link org.jdom.Verifier#checkCharacterData}) or
* if the given attribute type is not one of the
* supported types.
*/
public Attribute(final String name, final String value, final int type, final Namespace namespace) {
setName(name);
setValue(value);
setAttributeType(type);
setNamespace(namespace);
}
代码示例来源:origin: org.biomoby/taverna-biomoby
"namespace", "id" }) {
if (element.getAttribute(attr) != null)
element.getAttribute(attr).setNamespace(mobyNS);
"namespace", "id" }) {
if (element.getAttribute(attr) != null)
element.getAttribute(attr).setNamespace(mobyNS);
"namespace", "id" }) {
if (element.getAttribute(attr) != null)
element.getAttribute(attr).setNamespace(mobyNS);
"namespace", "id" }) {
if (element.getAttribute(attr) != null)
element.getAttribute(attr).setNamespace(mobyNS);
"namespace", "id" }) {
if (element.getAttribute(attr) != null)
element.getAttribute(attr).setNamespace(mobyNS);
"namespace", "id" }) {
if (element.getAttribute(attr) != null)
element.getAttribute(attr).setNamespace(mobyNS);
"namespace", "id" }) {
if (element.getAttribute(attr) != null)
element.getAttribute(attr).setNamespace(mobyNS);
"namespace", "id" }) {
内容来源于网络,如有侵权,请联系作者删除!