本文整理了Java中org.apache.axiom.om.OMElement.getPrefix()
方法的一些代码示例,展示了OMElement.getPrefix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OMElement.getPrefix()
方法的具体详情如下:
包路径:org.apache.axiom.om.OMElement
类名称:OMElement
方法名:getPrefix
暂无
代码示例来源:origin: org.apache.ws.commons.axiom/om-aspects
String getPrefix() {
if ((currentEvent == START_ELEMENT)
|| (currentEvent == END_ELEMENT)) {
return ((OMElement)node).getPrefix();
} else {
throw new IllegalStateException();
}
}
代码示例来源:origin: org.apache.ws.commons.axiom/axiom-impl
String getPrefix() {
if ((currentEvent == START_ELEMENT)
|| (currentEvent == END_ELEMENT)) {
return ((OMElement)node).getPrefix();
} else {
throw new IllegalStateException();
}
}
代码示例来源:origin: org.ballerinalang/ballerina-core
/**
* Extract the key from the element with namespace information.
*
* @param omElement XML element for which the key needs to be generated
* @param preserveNamespaces Whether namespace info included in the key or not
* @return String Element key with the namespace information
*/
private static String getElementKey(OMElement omElement, boolean preserveNamespaces) {
//Construct the element key based on the namespaces
StringBuffer stringBuffer = new StringBuffer();
if (preserveNamespaces) {
String prefix = omElement.getPrefix();
if (prefix != null) {
stringBuffer.append(prefix).append(":");
}
}
stringBuffer.append(omElement.getLocalName());
return stringBuffer.toString();
}
内容来源于网络,如有侵权,请联系作者删除!