Examples of selectNodes()


Examples of org.apache.xmlbeans.impl.xpath.jaxen.XBeansXPath.selectNodes()

        try
        {
            XmlObject doc = XmlObject.Factory.parse(file);
            XPath xpath = new XBeansXPath(xpathStr);
            XmlCursor xc = doc.newCursor();
            List results = xpath.selectNodes(xc);

            Iterator resultIter = results.iterator();

            System.out.println("Document :: " + doc );
            System.out.println("   XPath :: " + xpath );
View Full Code Here

Examples of org.atabaque.utils.xml.DOMDocument.selectNodes()

        StringBuffer process = new StringBuffer();
        process.append("<?xml version=\"1.0\" encoding=\"" + ConfigFile.getProperty("CHARSET_ENCODING") + "\"?>\n");
        process.append("<" + ELEM_PROCESS + " " + ELEM_ID + "=\"" + processId + "\" " +
            ELEM_NAME + "=\"" + processName + "\" " + ELEM_VERSION + "=\"" + processVersion + "\">\n");

        NodeList nodeList = doc.selectNodes("*");
        for (int i=0; i<nodeList.getLength(); i++) {
            Element e = (Element) nodeList.item(i);
           
            String id = e.getAttribute(ELEM_ID);
            String name = e.getAttribute(ELEM_NAME);
View Full Code Here

Examples of org.cfeclipse.cfml.parser.docitems.DocItem.selectNodes()

      System.out.println("CodeFoldingSetter::foldTags got a null from doc.getCFDocument().");
      return;
    }
    // nodes =
    // rootItem.selectNodes("//function[#startpos>=0 and #endpos < 200]");
    CFNodeList nodes = rootItem.selectNodes("//" + tagName.toLowerCase());

    Iterator it = nodes.iterator();
    while (it.hasNext()) {
      Object o = it.next();
      if (o instanceof CfmlTagItem && ((CfmlTagItem) o).matchingItem != null) {
View Full Code Here

Examples of org.cfeclipse.cfml.parser.docitems.ScriptItem.selectNodes()

    }
    scriptNodes = doc.getDocumentRoot().selectNodes("//ASTVarDeclaration");
    i = scriptNodes.iterator();
    while (i.hasNext()) {
      ScriptItem assignment = (ScriptItem) i.next();
      Iterator id = assignment.selectNodes("//ASTIdentifier").iterator();
      while (id.hasNext()) {
        ScriptItem identifier = (ScriptItem) id.next();
        if (identifier.getItemData().equals(variableName)) {
          return identifier.getParent().getLastChild().getItemData().replaceAll("\\(.*", "");
        }
View Full Code Here

Examples of org.dom4j.Document.selectNodes()

            SAXReader saxReader = new SAXReader(false);
            saxReader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",
                    false);
            Document doc = saxReader.read(webXML);
            // Find all <servelt-mapping> entries to discover name to URL mapping.
            List names = doc.selectNodes("//servlet-mapping");
            for (int i = 0; i < names.size(); i++) {
                Element nameElement = (Element)names.get(i);
                String url = nameElement.element("url-pattern").getTextTrim();
                // Destroy the servlet than remove from servlets map.
                HttpServlet servlet = servlets.get(pluginName + url);
View Full Code Here

Examples of org.dom4j.Document.selectNodes()

            SAXReader saxReader = new SAXReader(false);
            saxReader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",
                    false);
            Document doc = saxReader.read(webXML);
            // Find all <servlet> entries to discover name to class mapping.
            List classes = doc.selectNodes("//servlet");
            Map<String, Class> classMap = new HashMap<String, Class>();
            for (int i = 0; i < classes.size(); i++) {
                Element servletElement = (Element)classes.get(i);
                String name = servletElement.element("servlet-name").getTextTrim();
                String className = servletElement.element("servlet-class").getTextTrim();
View Full Code Here

Examples of org.dom4j.Document.selectNodes()

                String name = servletElement.element("servlet-name").getTextTrim();
                String className = servletElement.element("servlet-class").getTextTrim();
                classMap.put(name, finder.loadClass(className, component));
            }
            // Find all <servelt-mapping> entries to discover name to URL mapping.
            List names = doc.selectNodes("//servlet-mapping");
            for (int i = 0; i < names.size(); i++) {
                Element nameElement = (Element)names.get(i);
                String name = nameElement.element("servlet-name").getTextTrim();
                String url = nameElement.element("url-pattern").getTextTrim();
                // Register the servlet for the URL.
View Full Code Here

Examples of org.dom4j.Document.selectNodes()

              throw new SlideShowException(SlideShowException.ERR_DEFAULT_TRANSITION_ALREADY_SET);
            }else{
              transitions.setDefaultTransition(new Transition(Transition.EVERY_PAGE, new Integer(defTransDur.getText().trim()).intValue(), defType.getText().trim(), new Integer(defDur.getText().trim()).intValue()));
            }
          }
          List transitionsList = document.selectNodes("/transitions/transition");
          for (int i = 0; transitionsList != null && i < transitionsList.size(); i++) {
            Node transitionNode = (Node) transitionsList.get(i);
            Node type = transitionNode.selectSingleNode("@type");
            Node transDuration = transitionNode.selectSingleNode("@tduration");
            Node duration = transitionNode.selectSingleNode("@duration");
View Full Code Here

Examples of org.dom4j.Document.selectNodes()

    VFSItem vfsQTI = vfsUnzippedRoot.resolve("qti.xml");
    //getDocument(..) ensures that InputStream is closed in every case.
    Document doc = QTIHelper.getDocument((LocalFileImpl) vfsQTI);
    //if doc is null an error loading the document occured
    if (doc == null) return false;
    List metas = doc.selectNodes("questestinterop/assessment/qtimetadata/qtimetadatafield");
    for (Iterator iter = metas.iterator(); iter.hasNext();) {
      Element el_metafield = (Element) iter.next();
      Element el_label = (Element) el_metafield.selectSingleNode("fieldlabel");
      String label = el_label.getText();
      if (label.equals(AssessmentInstance.QMD_LABEL_TYPE)) { // type meta
View Full Code Here

Examples of org.dom4j.Element.selectNodes()

   */
  public List getQTIItemObjectList() {
    Resolver resolver = new ImsRepositoryResolver(repositoryEntryKey);
    Document doc = resolver.getQTIDocument();
    Element root = doc.getRootElement();
    List items = root.selectNodes("//item");
   
    ArrayList itemList = new ArrayList();

    for (Iterator iter= items.iterator(); iter.hasNext();) {
      Element el_item= (Element) iter.next();
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.