- 主页 [kxml.sourceforge.net]
small XML parser, designed for small environments
kXML is a small XML pull parser, specially designed for constrained environments such as Applets, Personal Java or MIDP devices. In contrast to kXML 1, kXML 2 is based on the common XML pull API.
Pull based XML parsing combines some of the advantages of SAX and DOM:
- In contrast to push parsers (SAX), pull parsers such as kXML make it possible to model the XML processing routines after the structure of the processed XML document. Events processing is similar to an InputStream. If a part of the stream requires special handling, the parser can simply be delegated to a specialized method by handing over the parser. - While the above is also possible with an explicit DOM, DOM usually requires that the whole document structure is present in main memory. - In contrast to DOM based parsing, the XML events are accessible immediately when they are available, it is not necessary to wait for the whole tree to build up.