Alex Rivera | Logout

SAX vs XmlTextReader - SAX in C#

Asked 2008-09-24T15:26:43.663
12

I am attempting to read a large XML document and I wanted to do it in chunks vs XmlDocument's way of reading the entire file into memory. I know I can use XmlTextReader to do this but I was wondering if anyone has used SAX for .NET? I know Java developers swear by it and I was wondering if it is worth giving it a try and if so what are the benefits in using it. I am looking for specifics.

Edit
Report

1 Answer

5

I believe there are no benefits using SAX at least due two reasons:

  1. SAX is a "push" model while XmlReader is a pull parser that has a number of benefits.
  2. Being dependent on a 3rd-party library rather than using a standard .NET API.
answered 2008-09-24T23:16:22.710

Your Answer