Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法使用 Android SAX 解析 XML 字符串?
是的,首先定义一个 SAX ContentHandler:
class MyXmlContentHandler extends DefaultHandler { ... // implement SAX callbacks here }
那么您可以使用XML实用程序类:
Xml.parse(xmlString, new MyXmlContentHandler());