Package org.jdom.xpath

Examples of org.jdom.xpath.XPath.valueOf()


      Map<String, String> properties)
          throws APIException {
    try {
      XPath xpaContents = XPath.newInstance("/api/parse/text/.");
      Element root = getRoot(properties, ApiRequest.MAX_ATTEMPTS);
      return xpaContents.valueOf(root);
    } catch (JDOMException e) {
      log.error("Error expanding templates", e);
      throw new APIException("Error parsing XML", e);
    }
  }
View Full Code Here


      XPath xpaNs = XPath.newInstance("./@ns");
      XPath xpaTitle = XPath.newInstance("./@title");
      while (iter.hasNext()) {
        Element currentNode = (Element) iter.next();
        Page similarPage = DataManager.getPage(
            getWiki(), xpaTitle.valueOf(currentNode), null, null, null);
        similarPage.setNamespace(xpaNs.valueOf(currentNode));
        list.add(similarPage);
      }

      // Retrieve continue
View Full Code Here

        SAXBuilder sb = new SAXBuilder();
        Document doc;
        doc = sb.build(isr);
        Element element = doc.getRootElement();
        XPath xpath = XPath.newInstance("gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString");
        return xpath.valueOf(element);
    }
}
View Full Code Here

     */
  public static String selectString(Element xml, String xpath, List<Namespace> theNSs) throws JDOMException {

    XPath xp = prepareXPath(xml, xpath, theNSs);

    return xp.valueOf(xml);
  }

  //---------------------------------------------------------------------------

    /**
 
View Full Code Here

        Iterator iterAct = resultsAct.iterator();
        while (iterAct.hasNext()) {
          Acteur act = new Acteur();
          noeudCourantActeur = (Element) iterAct.next();
          xpaAct = XPath.newInstance("./name/firstname");
          act.setPrenom(xpaAct.valueOf(noeudCourantActeur));

          xpaAct = XPath.newInstance("./name/lastname");
          act.setNom(xpaAct.valueOf(noeudCourantActeur));

          xpaAct = XPath.newInstance("./role");
View Full Code Here

          noeudCourantActeur = (Element) iterAct.next();
          xpaAct = XPath.newInstance("./name/firstname");
          act.setPrenom(xpaAct.valueOf(noeudCourantActeur));

          xpaAct = XPath.newInstance("./name/lastname");
          act.setNom(xpaAct.valueOf(noeudCourantActeur));

          xpaAct = XPath.newInstance("./role");
          act.setRole(xpaAct.valueOf(noeudCourantActeur));
          ArrayList<Acteur> la = f.getTabActeur();
          la.add(act);
View Full Code Here

          xpaAct = XPath.newInstance("./name/lastname");
          act.setNom(xpaAct.valueOf(noeudCourantActeur));

          xpaAct = XPath.newInstance("./role");
          act.setRole(xpaAct.valueOf(noeudCourantActeur));
          ArrayList<Acteur> la = f.getTabActeur();
          la.add(act);
          f.setTabActeur(la);
        }
View Full Code Here

        texteExpression.addNamespace(namespace);

        // R�cup�ration des informations � partir de la requ�te
        String langueOrigine = langueOrigineExpression.valueOf(request);
        String langueDestination = langueDestinationExpression.valueOf(request);
        String texteOriginal = texteExpression.valueOf(request);

        // Appel au service pour la traduction
        Traduction traduction = traductionService.traduitTexte(langueOrigine, langueDestination, texteOriginal);

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.