javax.xml.soap.Node.getNodeType()方法的使用及代码示例

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

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

Node.getNodeType介绍

暂无

代码示例

代码示例来源:origin: com.hynnet/xws-security

  1. public SOAPElement getFirstChildElement() {
  2. Iterator eachChild = getChildElements();
  3. javax.xml.soap.Node node = null;
  4. if (eachChild.hasNext()) {
  5. node = (javax.xml.soap.Node) eachChild.next();
  6. }else {
  7. return null;
  8. }
  9. while ((node.getNodeType() != Node.ELEMENT_NODE) && eachChild.hasNext()) {
  10. node = (javax.xml.soap.Node) eachChild.next();
  11. }
  12. if ((null != node) /*&& (node.getNodeType() == Node.ELEMENT_NODE)*/)
  13. return (SOAPElement) node;
  14. else
  15. return null;
  16. }

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

  1. private Node getValueNodeStrict(SOAPElement element) {
  2. Node node = (Node)element.getFirstChild();
  3. if (node != null) {
  4. if (node.getNextSibling() == null
  5. && node.getNodeType() == org.w3c.dom.Node.TEXT_NODE) {
  6. return node;
  7. } else {
  8. return null;
  9. }
  10. }
  11. return null;
  12. }

代码示例来源:origin: com.hynnet/xws-security

  1. /**
  2. * Takes a SOAPElement and checks if it has the right name and structure.
  3. */
  4. public EmbeddedReference(SOAPElement element) throws XWSSecurityException {
  5. setSOAPElement(element);
  6. if (!(element.getLocalName().equals("Embedded") &&
  7. XMLUtil.inWsseNS(element))) {
  8. log.log(Level.SEVERE,
  9. "WSS0752.invalid.embedded.reference");
  10. throw new XWSSecurityException("Invalid EmbeddedReference passed");
  11. }
  12. Iterator eachChild = getChildElements();
  13. Node node = null;
  14. while (!(node instanceof SOAPElement) && eachChild.hasNext()) {
  15. node = (Node) eachChild.next();
  16. }
  17. if ((node != null) && (node.getNodeType() == Node.ELEMENT_NODE)) {
  18. embeddedElement = (SOAPElement) node;
  19. } else {
  20. log.log(Level.SEVERE,
  21. "WSS0753.missing.embedded.token");
  22. throw new XWSSecurityException(
  23. "Passed EmbeddedReference does not contain an embedded element");
  24. }
  25. }

代码示例来源:origin: com.hynnet/xws-security

  1. if (node.getNodeType() != Node.ELEMENT_NODE) {
  2. continue;

相关文章