Re: XMLReader vs. SAX
| From: | Christian Stocker | Date: | Thu, 30 Sep 2004 12:02:34 +0000 |
| Subject: | Re: XMLReader vs. SAX | ||
| References: | 1 | Groups: | php.xml.dev |
| Request: | Send a blank email to php-xml-dev+get-469@lists.php.net to get a copy of this message | ||
On 30.9.2004 13:27 Uhr, Vivian Steller wrote:
i have some general question about XML Processing in PHP5 with "event based" parsers like SAX and XMLReader: - first, is XMLReader more "lightweight" than SAX meaning less powerfull? in fact it is simpler. - is XMLReader faster than SAX, especially if you want to create a DOM structure with SAX-callbackfuncs or with XMLReader->expand()? - isn't it possible to programm an "xmlreader" with SAX? would this be better/faster than XMLReader extension? SAX: can you stop the processing procedure while xml parsing?XMLReader is much faster than SAX, usually. And more powerfull and supports more of the XML basics (like proper namespaces support and even RelaxNG validation) More here: http://blog.bitflux.ch/archive/processing_large_xml_documents_with_php.html chregu -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB