Examples of DOMNodeList


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

Examples of net.sf.saxon.dom.DOMNodeList

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

Examples of net.sf.saxon.dom.DOMNodeList

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

Examples of net.sf.saxon.dom.DOMNodeList

  }

  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

Examples of org.apache.tools.ant.gui.xml.DOMNodeList

     * to be applied here.
     *
     * @param parent Parent to extract children from.
     */
    private List getChildren(DOMNode parent) {
        DOMNodeList children = parent.getChildNodes();
        int length = children.getLength();

        List retval = new ArrayList(length);
        for(int i = 0; i < length; i++) {
            // XXX This is where we will eventually add dynamic filtering
            // capabilities.
            DOMNode n = children.item(i);
            if(n instanceof ACSTreeNodeElement) {
                retval.add(n);
            }
        }

View Full Code Here

Examples of org.apache.tools.ant.gui.xml.DOMNodeList

        // Caution is the mother of wisdom ;-)
        if (aTarget.getParentNode() instanceof ACSProjectElement)
            parentProject = (ACSProjectElement) aTarget.getParentNode();
        else throw new IllegalArgumentException("Target not part of Project");
       
        DOMNodeList allNodes = parentProject.getChildNodes();
        ArrayList retVal = new ArrayList();
        int length = allNodes.getLength();
        for (int i = 0; i < length; i++) {
            DOMNode node = allNodes.item(i);
            if (node instanceof ACSTargetElement) {
                ACSTargetElement currentElement = ((ACSTargetElement)node);
                // ... leave out the current target TODO: avoid cyclic relations!
                if (!currentElement.getName().equals(aTarget.getName())) retVal.add(currentElement);
            }
View Full Code Here

Examples of org.apache.tools.ant.gui.xml.DOMNodeList

        JPanel c = new JPanel();
        c.setLayout(new java.awt.FlowLayout());
        f.setContentPane(c);
       
        DOMNodeList all2ndLevelNodes = context.getProjectManager().getOpen()[0].getChildNodes();

        int i= 0;
        while (i < all2ndLevelNodes.getLength()) {
           DOMNode node = all2ndLevelNodes.item(i);
           if (node instanceof ACSTargetElement) {
               ACSTargetElement newTarget = ((ACSTargetElement)node);
               DependentTargetPropertyEditor a = new DependentTargetPropertyEditor();
               c.add(a.getChild());
               a.setValue(newTarget);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.