<?xml version="1.0" encoding="utf-8"?>
<persons>
<person id = "23">
<name>张老师</name>
<age>21</age>
</person>
<person id = "20">
<name>李老师</name>
<age>25</age>
</person>
</persons>
打印的解析结果:
function startDocument: init list
function startElement: index 0 attributes qname:id value:23function characters: tag:name value:张老师
function characters: tag:age value:21
function endElement: list.add(map)
function startElement: index 0 attributes qname:id value:20
function characters: tag:name value:李老师
function characters: tag:age value:25
function endElement: list.add(map)
{id=23,age=21,name=张老师}
{id=20,age=25,name=李老师}