xml
haidong_IT
这个作者很懒,什么都没留下…
展开
-
使用stax操作xml(4)
//使用迭代模型的方式@Testpublic void test04() throws XMLStreamException, IOException{XMLInputFactory xf= XMLInputFactory.newInstance();InputStream is=TestStax.class.getClassLoader().getResourceAsStream原创 2014-05-12 16:42:42 · 672 阅读 · 0 评论 -
使用stax操作xml(1)
xml样例 Everyday Italian Giada De Laurentiis 2005 30.00 Harry Potter J K. Rowling 2005 29.99 XQuery Kick Start James McGovern Per Bothner Kurt Cagle原创 2014-05-12 16:39:32 · 731 阅读 · 0 评论 -
使用stax操作xml(2)
@Testpublic void test02() throws XMLStreamException, IOException{XMLInputFactory xf= XMLInputFactory.newInstance();InputStream is=TestStax.class.getClassLoader().getResourceAsStream("books.xml")原创 2014-05-12 16:40:55 · 705 阅读 · 0 评论 -
使用stax操作xml(3)
@Testpublic void test03() throws XMLStreamException, IOException{XMLInputFactory xf= XMLInputFactory.newInstance();InputStream is=TestStax.class.getClassLoader().getResourceAsStream("books.xml")原创 2014-05-12 16:42:03 · 881 阅读 · 0 评论 -
使用stax操作xml(5)
//使用过滤器@Testpublic void test05() throws XMLStreamException, IOException{XMLInputFactory xf= XMLInputFactory.newInstance();InputStream is=TestStax.class.getClassLoader().getResourceAsStream("bo原创 2014-05-12 16:43:40 · 861 阅读 · 0 评论 -
使用stax操作xml(6)
//通过xpath获取方式@Testpublic void test06() throws IOException, ParserConfigurationException, SAXException, XPathExpressionException{InputStream is=TestStax.class.getClassLoader().getResourceAsStream原创 2014-05-12 16:44:27 · 806 阅读 · 0 评论 -
对xml节点进行修改和编写
@Testpublic void test07() throws XMLStreamException, FactoryConfigurationError{XMLStreamWriter xw=XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);xw.writeStartDocument("UTF-8","原创 2014-05-12 16:45:55 · 1749 阅读 · 0 评论