本文整理了Java中org.dom4j.Element.getNamespaceURI()
方法的一些代码示例,展示了Element.getNamespaceURI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getNamespaceURI()
方法的具体详情如下:
包路径:org.dom4j.Element
类名称:Element
方法名:getNamespaceURI
[英]Returns the URI mapped to the namespace of this element if one exists otherwise an empty String
is returned.
[中]返回映射到此元素的命名空间的URI(如果存在),否则返回空的String
。
代码示例来源:origin: jaxen/jaxen
public String getElementNamespaceUri(Object obj)
{
Element elem = (Element) obj;
String uri = elem.getNamespaceURI();
if ( uri == null)
return "";
else
return uri;
}
代码示例来源:origin: igniterealtime/Openfire
protected static Element getChildElement(Element element, String namespace) {
//noinspection unchecked
List<Element> elements = element.elements();
if (elements.isEmpty()) {
return null;
}
for (Element childElement : elements) {
String childNamespace = childElement.getNamespaceURI();
if (namespace.equals(childNamespace)) {
return childElement;
}
}
return null;
}
代码示例来源:origin: org.freemarker/freemarker
@Override
String getNamespaceUri(Object node) {
if (node instanceof Element) {
return ((Element) node).getNamespaceURI();
}
if (node instanceof Attribute) {
return ((Attribute) node).getNamespaceURI();
}
return null;
}
代码示例来源:origin: igniterealtime/Openfire
private IQ getIQ(Element doc) {
Element query = doc.element("query");
if (query != null && "jabber:iq:roster".equals(query.getNamespaceURI())) {
return new Roster(doc);
}
else {
return new IQ(doc, skipJIDValidation);
}
}
代码示例来源:origin: igniterealtime/Openfire
private IQ getIQ(Element doc) {
Element query = doc.element("query");
if (query != null && "jabber:iq:roster".equals(query.getNamespaceURI())) {
return new Roster(doc);
}
else {
return new IQ(doc);
}
}
代码示例来源:origin: igniterealtime/Openfire
private IQ getIQ(Element doc) {
Element query = doc.element("query");
if (query != null && "jabber:iq:roster".equals(query.getNamespaceURI())) {
return new Roster(doc);
}
else {
return new IQ(doc, !validateJIDs());
}
}
代码示例来源:origin: org.freemarker/freemarker
@Override
void getChildren(Object node, String localName, String namespaceUri, List result) {
if (node instanceof Element) {
Element e = (Element) node;
if (localName == null) {
result.addAll(e.elements());
} else {
result.addAll(e.elements(e.getQName().getDocumentFactory().createQName(localName, "", namespaceUri)));
}
} else if (node instanceof Document) {
Element root = ((Document) node).getRootElement();
if (localName == null || (equal(root.getName(), localName) && equal(root.getNamespaceURI(), namespaceUri))) {
result.add(root);
}
}
}
代码示例来源:origin: igniterealtime/Openfire
if (!rsmElement.getNamespaceURI().equals(
NAMESPACE_RESULT_SET_MANAGEMENT)) {
代码示例来源:origin: jaxen/jaxen
if (namespaceURI.equals(el.getNamespaceURI()) == false) {
return JaxenConstants.EMPTY_ITERATOR;
代码示例来源:origin: igniterealtime/Openfire
long h = new Long(element.attributeValue("h"));
String previd = element.attributeValue("previd");
startResume( element.getNamespaceURI(), previd, h);
break;
case "r":
代码示例来源:origin: igniterealtime/Openfire
String namespace = childElement.getNamespaceURI();
String profile = childElement.attributeValue("profile");
代码示例来源:origin: igniterealtime/Openfire
namespace = childElement.getNamespaceURI();
代码示例来源:origin: igniterealtime/Openfire
Element childElement = iq.getChildElement();
if (childElement != null) {
String namespace = childElement.getNamespaceURI();
if ("http://jabber.org/protocol/disco#info".equals(namespace)) {
代码示例来源:origin: igniterealtime/Openfire
continue;
if (!el.getNamespaceURI().equals("http://jabber.org/protocol/chatstates")
&& !(el.getQName().equals(QName.get("rtt", "urn:xmpp:rtt:0")))
) {
代码示例来源:origin: igniterealtime/Openfire
Node node = pepService.getNode( data.getNamespaceURI() );
if ( node == null )
PubSubEngine.CreateNodeResponse response = PubSubEngine.createNodeHelper( pepService, owner, pepService.getDefaultNodeConfiguration( true ).getConfigurationForm().getElement(), data.getNamespaceURI(), PRIVATE_DATA_PUBLISHING_OPTIONS );
node = response.newNode;
代码示例来源:origin: igniterealtime/Openfire
continue;
Element added = message.addChildElement(child.getName(), child.getNamespaceURI());
if (!child.getText().isEmpty()) {
added.setText(child.getText());
代码示例来源:origin: igniterealtime/Openfire
namespace = childElement.getNamespaceURI();
代码示例来源:origin: igniterealtime/Openfire
"jabber:iq:auth".equals(childElement.getNamespaceURI()) ||
"jabber:iq:register".equals(childElement.getNamespaceURI()) ||
"urn:ietf:params:xml:ns:xmpp-bind".equals(childElement.getNamespaceURI())))) {
handle(packet);
} else if (packet.getType() == IQ.Type.get || packet.getType() == IQ.Type.set) {
代码示例来源:origin: igniterealtime/Openfire
namespace = childElement.getNamespaceURI();
代码示例来源:origin: igniterealtime/Openfire
if ( pepService != null )
final Node node = pepService.getNode( data.getNamespaceURI() );
if ( node != null )
内容来源于网络,如有侵权,请联系作者删除!