org.w3c.dom.Node.lookupNamespaceURI()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(272)

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

Node.lookupNamespaceURI介绍

[英]Look up the namespace URI associated to the given prefix, starting from this node.
See for details on the algorithm used by this method.
[中]从该节点开始查找与给定前缀关联的命名空间URI。
有关此方法使用的算法的详细信息,请参阅。

代码示例

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

  1. @Override
  2. public String lookupNamespaceURI(String prefix) {
  3. return node.lookupNamespaceURI(prefix);
  4. }

代码示例来源:origin: xyz.cofe/common

  1. @Override
  2. public String lookupNamespaceURI(String prefix) {
  3. return node.lookupNamespaceURI(prefix);
  4. }

代码示例来源:origin: apache/batik

  1. /**
  2. * <b>DOM</b>: Implements
  3. * {@link org.w3c.dom.xpath.XPathNSResolver#lookupNamespaceURI(String)}.
  4. */
  5. public String lookupNamespaceURI(String prefix) {
  6. return contextNode.lookupNamespaceURI(prefix);
  7. }
  8. }

代码示例来源:origin: fbacchella/jrds

  1. /**
  2. * @param prefix
  3. * @return
  4. * @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String)
  5. */
  6. public String lookupNamespaceURI(String prefix) {
  7. return parent.lookupNamespaceURI(prefix);
  8. }

代码示例来源:origin: org.vx68k.quercus/quercus

  1. public String lookupNamespaceURI(String prefix)
  2. {
  3. return _delegate.lookupNamespaceURI(prefix);
  4. }

代码示例来源:origin: org.jboss.ws.native/jbossws-native-core

  1. public String lookupNamespaceURI(String prefix)
  2. {
  3. return this.domNode.lookupNamespaceURI(prefix);
  4. }

代码示例来源:origin: apache/servicemix-bundles

  1. @Override
  2. public String getNamespaceURI(String prefix) {
  3. return _current.lookupNamespaceURI(prefix);
  4. }

代码示例来源:origin: org.xmlunit/xmlunit-legacy

  1. public String getNamespaceURI(String prefix) {
  2. return node.lookupNamespaceURI(prefix);
  3. }

代码示例来源:origin: org.apache.cxf/cxf-api

  1. private static String getNameSpaceUri(Node node, String content, String namespaceURI) {
  2. if (namespaceURI == null) {
  3. namespaceURI = node.lookupNamespaceURI(content.substring(0,
  4. content.indexOf(":")));
  5. }
  6. return namespaceURI;
  7. }

代码示例来源:origin: org.apache.cxf/cxf-core

  1. private static String getNameSpaceUri(Node node, String content, String namespaceURI) {
  2. if (namespaceURI == null) {
  3. namespaceURI = node.lookupNamespaceURI(content.substring(0,
  4. content.indexOf(":")));
  5. }
  6. return namespaceURI;
  7. }

代码示例来源:origin: apache/cxf

  1. private static String getNameSpaceUri(Node node, String content, String namespaceURI) {
  2. if (namespaceURI == null) {
  3. namespaceURI = node.lookupNamespaceURI(content.substring(0,
  4. content.indexOf(":")));
  5. }
  6. return namespaceURI;
  7. }

代码示例来源:origin: com.sun.phobos/phobos-rhino

  1. private Namespace getDefaultNamespace() {
  2. String prefix = "";
  3. String uri = (dom.lookupNamespaceURI(null) == null) ? "" : dom.lookupNamespaceURI(null);
  4. return Namespace.create(prefix, uri);
  5. }

代码示例来源:origin: org.objectweb.celtix/celtix-api

  1. private static String getNameSpaceUri(Node node, String content, String namespaceURI) {
  2. if (namespaceURI == null) {
  3. namespaceURI = node.lookupNamespaceURI(content.substring(0,
  4. content.indexOf(":")));
  5. }
  6. return namespaceURI;
  7. }

代码示例来源:origin: com.github.tntim96/rhino

  1. private Namespace getDefaultNamespace() {
  2. String prefix = "";
  3. String uri = (dom.lookupNamespaceURI(null) == null) ? "" : dom.lookupNamespaceURI(null);
  4. return Namespace.create(prefix, uri);
  5. }

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

  1. private static String getNameSpaceUri(Node node, String content, String namespaceURI) {
  2. if (namespaceURI == null) {
  3. namespaceURI = node.lookupNamespaceURI(content.substring(0,
  4. content.indexOf(":")));
  5. }
  6. return namespaceURI;
  7. }

代码示例来源:origin: org.glassfish.webservices/jsr109-impl

  1. private String getAsQName(Node n) {
  2. String nodeValue = n.getTextContent();
  3. int index = nodeValue.indexOf(":");
  4. if(index <= 0) {
  5. return nodeValue;
  6. }
  7. String prefix = nodeValue.substring(0, index);
  8. String ns = n.lookupNamespaceURI(prefix);
  9. return("{"+ns+"}"+nodeValue.substring(index+1));
  10. }

代码示例来源:origin: org.glassfish.main.webservices/webservices-connector

  1. private String getAsQName(Node n) {
  2. String nodeValue = n.getTextContent();
  3. int index = nodeValue.indexOf(":");
  4. if(index <= 0) {
  5. return nodeValue;
  6. }
  7. String prefix = nodeValue.substring(0, index);
  8. String ns = n.lookupNamespaceURI(prefix);
  9. return("{"+ns+"}"+nodeValue.substring(index+1));
  10. }

代码示例来源:origin: com.sun.phobos/phobos-rhino

  1. void declareNamespace(String prefix, String uri) {
  2. if (!(dom instanceof Element)) throw new IllegalStateException();
  3. if (dom.lookupNamespaceURI(uri) != null && dom.lookupNamespaceURI(uri).equals(prefix)) {
  4. // do nothing
  5. } else {
  6. Element e = (Element)dom;
  7. declareNamespace(e, prefix, uri);
  8. }
  9. }

代码示例来源:origin: com.github.tntim96/rhino

  1. void declareNamespace(String prefix, String uri) {
  2. if (!(dom instanceof Element)) throw new IllegalStateException();
  3. if (dom.lookupNamespaceURI(uri) != null && dom.lookupNamespaceURI(uri).equals(prefix)) {
  4. // do nothing
  5. } else {
  6. Element e = (Element)dom;
  7. declareNamespace(e, prefix, uri);
  8. }
  9. }

代码示例来源:origin: com.marklogic/marklogic-mapreduce2

  1. /** {@inheritDoc} */
  2. @Override
  3. public String lookupNamespaceURI(String prefix) {
  4. return getParentNode().lookupNamespaceURI(prefix);
  5. }
  6. }

相关文章