|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: StreamSource vs SAXSource
Pramodh Peddi wrote:
I understand the differences between DOMSource and SAXSource. But, I din't quite understand the differences (in terms of memory and time consumption) between SAXSource and StreamSource.
If you read the XML from a file or an URL connection, or if you somehow get a string, then you have to use a StreamSource. There are basically two reasons to prefer a SAXSource instead of a StreamSource: If you get, for example, the data already in a prestructured form, like an SAX event stream or as the result set of a database, then it might be more useful to use a SAX source instead of going through the trouble of building a serialized XML stream to feed into a StreamSource. This means of course providing a custom XMLReader to the SAXSource. The other reason to use a SAXSource if you have to take some control over the parser or its configuration, for example for providing a custom entity resolver or forcing schema validation. J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








