本文整理了Java中org.w3c.dom.Element.lookupPrefix()
方法的一些代码示例,展示了Element.lookupPrefix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.lookupPrefix()
方法的具体详情如下:
包路径:org.w3c.dom.Element
类名称:Element
方法名:lookupPrefix
暂无
代码示例来源:origin: robovm/robovm
case Node.ATTRIBUTE_NODE:{
if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
return getOwnerElement().lookupPrefix(namespaceURI);
代码示例来源:origin: robovm/robovm
case Node.ATTRIBUTE_NODE:{
if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
return getOwnerElement().lookupPrefix(namespaceURI);
代码示例来源:origin: robovm/robovm
case Node.ATTRIBUTE_NODE:{
if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
return getOwnerElement().lookupPrefix(namespaceURI);
代码示例来源:origin: xalan/xalan
case Node.ATTRIBUTE_NODE:{
if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
return getOwnerElement().lookupPrefix(namespaceURI);
代码示例来源:origin: xalan/xalan
case Node.ATTRIBUTE_NODE:{
if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
return getOwnerElement().lookupPrefix(namespaceURI);
代码示例来源:origin: xalan/xalan
case Node.ATTRIBUTE_NODE:{
if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
return getOwnerElement().lookupPrefix(namespaceURI);
代码示例来源:origin: camunda/camunda-bpm-platform
public String lookupPrefix(String namespaceUri) {
synchronized(document) {
return element.lookupPrefix(namespaceUri);
}
}
代码示例来源:origin: org.camunda.bpm.model/camunda-xml-model
public String lookupPrefix(String namespaceUri) {
synchronized(document) {
return element.lookupPrefix(namespaceUri);
}
}
代码示例来源:origin: org.switchyard/switchyard-config
/**
* {@inheritDoc}
*/
@Override
public String lookupPrefix(String namespaceURI) {
return _element.lookupPrefix(namespaceURI);
}
代码示例来源:origin: jboss-switchyard/core
/**
* {@inheritDoc}
*/
@Override
public String lookupPrefix(String namespaceURI) {
return _element.lookupPrefix(namespaceURI);
}
代码示例来源:origin: apache/cxf
private void appendJaxbVersion(final Element schemaElement) {
String jaxbPrefix = schemaElement.lookupPrefix(ToolConstants.NS_JAXB_BINDINGS);
if (jaxbPrefix == null) {
schemaElement.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
"xmlns:jaxb", ToolConstants.NS_JAXB_BINDINGS);
schemaElement.setAttributeNS(ToolConstants.NS_JAXB_BINDINGS, "jaxb:version", "2.0");
}
}
代码示例来源:origin: com.jamesmurty.utils/java-xmlbuilder
public String getPrefix(String namespaceURI) {
Set<String> prefixes = this.nsUriToPrefixesMap.get(namespaceURI);
if (prefixes != null && prefixes.size() > 0) {
return prefixes.iterator().next();
}
if (this.element != null) {
return this.element.lookupPrefix(namespaceURI);
}
return null;
}
代码示例来源:origin: Nextdoor/bender
public String getPrefix(String namespaceURI) {
Set<String> prefixes = this.nsUriToPrefixesMap.get(namespaceURI);
if (prefixes != null && prefixes.size() > 0) {
return prefixes.iterator().next();
}
if (this.element != null) {
return this.element.lookupPrefix(namespaceURI);
}
return null;
}
代码示例来源:origin: org.opensingular/singular-commons
/**
* @see org.w3c.dom.Node#lookupPrefix(java.lang.String)
*/
@Override
public String lookupPrefix(String namespaceURI) {
return original.get().lookupPrefix(namespaceURI);
}
代码示例来源:origin: org.opensingular/singular-commons
/**
* @see org.w3c.dom.Node#lookupPrefix(java.lang.String)
*/
public String lookupPrefix(String namespaceURI) {
return getCurrentInternal().lookupPrefix(namespaceURI);
}
代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite
@Override
protected void runTest() throws Throwable {
Document document = dbf.newDocumentBuilder().newDocument();
Element root = document.createElementNS("urn:ns1", "p:root");
Element child = document.createElementNS("urn:ns2", "p:child");
root.appendChild(child);
assertNull(child.lookupPrefix("urn:ns1"));
}
}
代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite
@Override
protected void runTest() throws Throwable {
Document document = dbf.newDocumentBuilder().newDocument();
Element element = document.createElementNS(null, "test");
assertThat(element.lookupPrefix(XMLConstants.XML_NS_URI)).isNull();
assertThat(element.lookupPrefix(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)).isNull();
}
}
代码示例来源:origin: Geomatys/geotoolkit
@Override
public String lookupPrefix(String namespaceURI) {
final Element elem = getElement();
return elem != null ? elem.lookupPrefix(namespaceURI) : null;
}
代码示例来源:origin: com.marklogic/marklogic-mapreduce2
@Override
public String lookupPrefix(String namespaceURI) {
return getDocumentElement().lookupPrefix(namespaceURI);
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
public static String getPrefix(Element element, String namespace) {
if (element.isDefaultNamespace(namespace)) {
return XMLConstants.DEFAULT_NS_PREFIX;
}
return element.lookupPrefix(namespace);
}
内容来源于网络,如有侵权,请联系作者删除!