org.apache.axiom.om.OMElement.getPrefix()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(105)

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

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();
}

相关文章

微信公众号

最新文章

更多