all groups > dotnet xml > december 2005 >
You're in the

dotnet xml

group:

XML Parsing with SAX


XML Parsing with SAX Sam
12/24/2005 11:08:38 PM
dotnet xml:
Hi, Do anyone know if SAX can be used to parse XML using dotnet framework?
If yes any sample will be greatly appreciated. Thanks.

Re: XML Parsing with SAX Martin Honnen
12/25/2005 2:34:57 PM


[quoted text, click to view]

The .NET framework neither in version 1.x nor in version 2.0 has any
built-in classes to do SAX parsing. But there are plenty of APIs to
parse XML, instead of the push based SAX parsing model you can use the
pull based XmlReader/XmlTextReader approach.
Docs are here, .NET 1.x:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXmlTextReaderClassTopic.asp>
..NET 2.0:
<http://msdn2.microsoft.com/b8a5e1s5(en-US,VS.80).aspx>

As for SAX itself, I don't know whether anyone outside of Microsoft
provides a SAX parser for the .NET framework, google for that if you
really think you need it, I guess you can find something that way.

--

Martin Honnen --- MVP XML
Re: XML Parsing with SAX Oleg Tkachenko [MVP]
12/25/2005 3:37:24 PM
[quoted text, click to view]

..NET Framework doesn't support SAX, but it provides alternative API -
XmlReader. Take a look at
http://msdn2.microsoft.com/en-us/library/sbw89de7.aspx.
Also there are some third party SAX implementation for .NET, search the
web for more info.

--
Oleg Tkachenko [XML MVP, MCAD]
AddThis Social Bookmark Button