采用SAX方式解析xml
还是老样子,javabean实体类:
JUnit测试:
代码中注释部分的输出是用来看stack实时size大小,有意思,你看出什么了吗:startElement:1characters:1startElement:2characters:2startElement:3characters:3endElement:2characters:2startElement:3characters:3endElement:2characters:2endElement:1characters:1startElement:2characters:2startElement:3characters:3endElement:2characters:2startElement:3characters:3endElement:2characters:2endElement:1characters:1endElement:0