http://www.saxproject.org/event.html Events vs. Trees(大XML文档用SAX) There are two major types of XML (or SGML) APIs: Tree-based APIs These map an XML document into an internal tree structure, then allow an application to navigate that tree. The Documen…
对xml文档的解析常见的有JDK中的sax,dom,jaxb,stax和JAVA类库JDOM和DOM4J,下面先说说前三个. Java中解析XML的工具很多,像JDOM,DOM4J等,但Java标准库提供的两种解析XML文档解析器是:DOM(Document Object Module)解析器 和 SAX(Simple API for XML)解析器.DOM解析器会读入整个XML文档并转换成树结构:SAX解析器会在读入XML文档时生成相应的事件:故也常叫基于文档对象模型的XML解析和基于事件驱动…