Package org.dom4j

Examples of org.dom4j.Document.selectNodes()


    public void configure(String pluginName) {
        try {
            SAXReader saxReader = new SAXReader();
            saxReader.setEncoding("UTF-8");
            Document cacheXml = saxReader.read(configDataStream);
            List<Node> mappings = cacheXml.selectNodes("/cache-config/cache-mapping");
            for (Node mapping: mappings) {
                registerCache(pluginName, mapping);
            }
        }
        catch (DocumentException e) {
View Full Code Here


                final Map<String, String> pBuy = priceBuyProductByPriceList(obq2);
                final Map<String, String> pSell = priceSellProductByPriceList(
                        lData.get("priceListId"), obq2);

                final List<Element> lNodes = doc
                        .selectNodes("/ob:Openbravo/Product");
                for (final Element e : lNodes) {
                    final String sid = e.elementText("id");
                    final String defSell = (pSell.get(sid) == null) ? "0"
                            : pSell.get(sid);
View Full Code Here

    String type = (String) param.get("type");
    if ("listAll".equals(type))
    {
      if (locale != null)
      {
        List list = document.selectNodes("//locale[@code='" + locale.toString()
            + "']//sug");
        StringBuffer sb = new StringBuffer();
        sb.append("<Strings locale=\"" + locale.toString() + "\">\r\n");
        for (int i = 0; i < list.size(); i++)
        {
View Full Code Here

        StringBuffer result = new StringBuffer();

        SAXReader reader = new SAXReader();
        Document doc = reader.read(new URL(strUrl).openStream());

        List<Node> nodeList = doc.selectNodes("//alipay/*");

        for (Node node : nodeList) {
            // 截取部分不需要解析的信息
            if (node.getName().equals("is_success") && node.getText().equals("T")) {
                // 判断是否有成功标示
View Full Code Here

        for (Node node : nodeList) {
            // 截取部分不需要解析的信息
            if (node.getName().equals("is_success") && node.getText().equals("T")) {
                // 判断是否有成功标示
                List<Node> nodeList1 = doc.selectNodes("//response/timestamp/*");
                for (Node node1 : nodeList1) {
                    result.append(node1.getText());
                }
            }
        }
View Full Code Here

        StringBuffer result = new StringBuffer();

        SAXReader reader = new SAXReader();
        Document doc = reader.read(new URL(strUrl).openStream());

        List<Node> nodeList = doc.selectNodes("//alipay/*");

        for (Node node : nodeList) {
            // 截取部分不需要解析的信息
            if (node.getName().equals("is_success") && node.getText().equals("T")) {
                // 判断是否有成功标示
View Full Code Here

        for (Node node : nodeList) {
            // 截取部分不需要解析的信息
            if (node.getName().equals("is_success") && node.getText().equals("T")) {
                // 判断是否有成功标示
                List<Node> nodeList1 = doc.selectNodes("//response/timestamp/*");
                for (Node node1 : nodeList1) {
                    result.append(node1.getText());
                }
            }
        }
View Full Code Here

                oldFolder.oiSeries = file.getParentFile().getParentFile().getName();
            } else {
                oldFolder.oiSeries = oiSeriesNode.getText();
            }
           
            List list = doc.selectNodes( "//file" );
            List fileNames = new ArrayList(list.size());
            for (Iterator it = list.iterator(); it.hasNext(); ){
                Node currentFileNode = (Node) it.next();
                String fileName = currentFileNode.getText();
                if (!fileName.equals(DUBLIN_CORE_FILE) && !fileName.equals(ARCHIMEDE_METADATA_FILE)) {
View Full Code Here

        String    dataAsXml = stringWriter.toString();
        SAXReader reader    = new SAXReader();
        Document  testDoc   = reader.read(new InputSource(new StringReader(dataAsXml)));

        List   misc1Rows       = testDoc.selectNodes("//misc1");
        List   misc2Rows       = testDoc.selectNodes("//misc2");
        String pkColumnName    = "pk";
        String fkColumnName    = "fk";
        String valueColumnName = "avalue";
View Full Code Here

        String    dataAsXml = stringWriter.toString();
        SAXReader reader    = new SAXReader();
        Document  testDoc   = reader.read(new InputSource(new StringReader(dataAsXml)));

        List   misc1Rows       = testDoc.selectNodes("//misc1");
        List   misc2Rows       = testDoc.selectNodes("//misc2");
        String pkColumnName    = "pk";
        String fkColumnName    = "fk";
        String valueColumnName = "avalue";

        if (misc1Rows.size() == 0)
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.