Menu Home

xml

Android使用SAX解析XML

String xml = “<?xml version=\”1.0\”?>\n” + “<user>\n” + “<name>lnmcc</name>\n” + “<age>10</age>\n”; class XMLUser { String name; String age; public XMLUser() { name = “”; age = “”; } } private class UserXMLHandler extends DefaultHandler { static final int NONE = 0; static final int NAME = 1; static final int […]