Package net.sf.saxon.dom

Examples of net.sf.saxon.dom.DOMNodeList


     * nodes. DOM Method.
     */

    public NodeList getChildNodes() {
        try {
            return new DOMNodeList(
                    new SequenceExtent(iterateAxis(Axis.CHILD)));
        } catch (XPathException err) {
            return null;
            // can't happen
        }
View Full Code Here


                if (tagname.equals("*") || tagname.equals(next.getDisplayName())) {
                    nodes.add(next);
                }
            }
        }
        return new DOMNodeList(new SequenceExtent(nodes));
    }
View Full Code Here

                    (localName.equals("*") || localName.equals(next.getLocalPart()))) {
                    nodes.add(next);
                }
            }
        }
        return new DOMNodeList(new SequenceExtent(nodes));
    }
View Full Code Here

  }

  private List<Map<String, String>> findElementsByXpath(String xpath, Node from)
      throws XPathExpressionException {
    XPathExpression expr = xpath2.compile(xpath);
    DOMNodeList elements;

    elements = (DOMNodeList) expr.evaluate(document, XPathConstants.NODESET);

    List<Map<String, String>> res = new ArrayList<Map<String, String>>();
    for (int i = 0; i < elements.getLength(); i++) {
      Element el = (Element) elements.item(i);
      String reference = el.getAttribute("ref");
      String type = el.getNodeName();
      res.add(ImmutableMap.of("ELEMENT", reference, "type", type));
    }
View Full Code Here

TOP

Related Classes of net.sf.saxon.dom.DOMNodeList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.