首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

采取DOM解析XML

2012-09-03 
采用DOM解析XMLpublic void testReadDOM() throws ParserConfigurationException, SAXException, IOExcept

采用DOM解析XML

public void testReadDOM() throws ParserConfigurationException, SAXException, IOException{DomXml sax = new DomXml();InputStream inStream = this.getClass().getClassLoader().getResourceAsStream("secn.xml");List<Person> persons = sax.domParser(inStream);for(Person person:persons){Log.i("SaxTest", String.valueOf(person.getName()));}}

?

热点排行