zoukankan      html  css  js  c++  java
  • XPath

    http://www.cnblogs.com/bmaker/p/5605738.html

    XPath 是一门在 XML 文档中查找信息的语言。XPath 可用来在 XML 文档中对元素和属性进行遍历。

    public class TransferXML {  

    •     public static void main(String[] args) throws Exception{          
    •         SAXReader saxReader = new SAXReader();  
    •         File file = new File("D: est.xml");  
    •         Document document = saxReader.read(file);  
    •   
    •         Map map = new HashMap();  
    •         map.put("design","http://www.eclipse.org/birt/2005/design");  
    •         XPath x = document.createXPath("//design:list-property");  
    •         x.setNamespaceURIs(map);  
    •         List nodelist = x.selectNodes(document);  
    •         System.out.println(nodelist.size());  
    •     }  
  • 相关阅读:
    *Reverse Linked List II
    *Insertion Sort List
    Convert Sorted List to Binary Search Tree
    Reverse Integer
    read cache return null
    纳秒和随机数
    libthread_db
    gdb
    tls session resumption
    http://www.linux-commands-examples.com/xmllint
  • 原文地址:https://www.cnblogs.com/lizhenlzlz/p/7059077.html
Copyright © 2011-2022 走看看