本文整理了Java中org.jdom2.Attribute.getNamespacePrefix()
方法的一些代码示例,展示了Attribute.getNamespacePrefix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.getNamespacePrefix()
方法的具体详情如下:
包路径:org.jdom2.Attribute
类名称:Attribute
方法名:getNamespacePrefix
[英]This will retrieve the namespace prefix of the Attribute
. For any XML attribute which appears as [namespacePrefix]:[attributeName]
, the namespace prefix of the attribute would be [namespacePrefix]
. When the attribute has no namespace, an empty String
is returned.
[中]这将检索Attribute
的命名空间前缀。对于任何显示为[namespacePrefix]:[attributeName]
的XML属性,该属性的命名空间前缀将为[namespacePrefix]
。当属性没有名称空间时,将返回一个空String
。
代码示例来源:origin: org.jdom/jdom
@Override
public final String getAttributeQName(Object att) {
Attribute attribute = (Attribute)att;
if (attribute.getNamespacePrefix().length() == 0) {
return attribute.getName();
}
return attribute.getNamespacePrefix() + ":" + attribute.getName();
}
代码示例来源:origin: org.jdom/jdom
if (prefix.equals(a.getNamespacePrefix())) {
return a.getNamespace();
代码示例来源:origin: org.opencadc/cadc-test-uws
protected void validateErrorDetail(WebConversation conversation, WebResponse response, List list)
throws Exception
{
// Check for the error detail url.
boolean found = false;
for (Iterator it = list.iterator(); it.hasNext(); )
{
Element element = (Element) it.next();
List attributes = element.getAttributes();
for (Iterator itt = attributes.iterator(); itt.hasNext(); )
{
Attribute attribute = (Attribute) itt.next();
if (attribute.getNamespacePrefix().equals("xlink") &&
attribute.getName().equals("href"))
{
head(conversation, attribute.getValue());
found = true;
}
}
}
assertTrue("Missing attribute xlink:href", found);
}
代码示例来源:origin: org.opencadc/cadc-util
w.print(QUOTE);
w.print("@");
if (StringUtil.hasText(a.getNamespacePrefix()))
w.print(a.getNamespacePrefix());
w.print(":");
代码示例来源:origin: org.opencadc/cadc-test-uws
if (attribute.getNamespacePrefix().equals("xlink")
&& attribute.getName().equals("href"))
代码示例来源:origin: org.opencadc/cadc-test-uws
if (attribute.getNamespacePrefix().equals("xlink")
&& attribute.getName().equals("href"))
代码示例来源:origin: io.wcm.tooling.commons/io.wcm.tooling.commons.crx-packmgr-helper
collectNamespacePrefix(namespacePrefixesActuallyUsed, attribute.getNamespacePrefix());
内容来源于网络,如有侵权,请联系作者删除!