XPath解析xml文件、html文件
摘要:
直接贴代码 DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); //建立documentBuilder Document document = builder.parse(new java.io.FileInputStream(new File("out.xml")),"utf8"); //读取xml文件 XPath xpath = XPathFactory.newInstance().newXPath(); ... 阅读全文
posted @ 2013-11-12 10:29 谢皓宇 阅读(553) 评论(0) 推荐(0) 编辑