org.dom4j.Element.getNamespacesForURI()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(208)

本文整理了Java中org.dom4j.Element.getNamespacesForURI()方法的一些代码示例,展示了Element.getNamespacesForURI()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getNamespacesForURI()方法的具体详情如下:
包路径:org.dom4j.Element
类名称:Element
方法名:getNamespacesForURI

Element.getNamespacesForURI介绍

[英]Returns the all namespaces which are mapped to the given URI or an empty list if no such namespaces could be found.
[中]返回映射到给定URI的所有命名空间,如果找不到此类命名空间,则返回空列表。

代码示例

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public List getNamespacesForURI(String s) {
  return element.getNamespacesForURI( s );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public List getNamespacesForURI(String s) {
  return element.getNamespacesForURI( s );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public List getNamespacesForURI(String s) {
  return element.getNamespacesForURI( s );
}

代码示例来源:origin: hibernate/hibernate

public List getNamespacesForURI(String s) {
  return element.getNamespacesForURI( s );
}

代码示例来源:origin: hibernate/hibernate

public List getNamespacesForURI(String s) {
  return target().getNamespacesForURI( s );
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public List getNamespacesForURI(String s) {
  return target().getNamespacesForURI( s );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public List getNamespacesForURI(String s) {
  return target().getNamespacesForURI( s );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public List getNamespacesForURI(String s) {
  return target().getNamespacesForURI( s );
}

代码示例来源:origin: dom4j/dom4j

public void testGetNamespacesForURI() throws Exception {
  String xml = "<schema targetNamespace='http://SharedTest.org/xsd' "
      + "        xmlns='http://www.w3.org/2001/XMLSchema' "
      + "        xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"
      + "    <complexType name='AllStruct'>" + "        <all>"
      + "            <element name='arString' type='xsd:string'/>"
      + "            <element name='varInt' type='xsd:int'/>"
      + "        </all>" + "    </complexType>" + "</schema>";
  Document doc = DocumentHelper.parseText(xml);
  Element schema = doc.getRootElement();
  List namespaces = schema
      .getNamespacesForURI("http://www.w3.org/2001/XMLSchema");
  assertNotNull(namespaces);
  assertEquals(2, namespaces.size());
}

相关文章

微信公众号

最新文章

更多

Element类方法