Using SAX and DOM with C#

E

Erland

Hi all,

I am new to .NET and i am about to start learning SAX, DOM and C# in
parallel :)

My questions is : if i want to learn DOM, SAX using C# then what is the
good starting point. Which namespaces i should look for DOM and SAX in
..NET ? Any other pointers and/or web resources will be highly
appreciated.
If anything else comes to your mind regarding DOM, SAX and C# then
please enlighten me.
Thank you for your time and concern. Any help will be highly
appreciated.
Regards,
-Erland
 
N

Nicholas Paldino [.NET/C# MVP]

Erland,

If you want to look at the DOM model that they have in .NET for XML,
check out the System.Xml namespace.

.NET does not have a SAX implementation (which is a push model).
Rather, they have a pull model, where you read node by node, and perform
your actions that way. You get the same speed increases as SAX, but an
easier programming model (IMO).

If you want to use this, check out the XmlNodeReader, XmlTextReader and
XmlValidatingReader classes in the System.Xml namespace.

If you want to use SAX, you can always use the MSXML parser through COM
interop.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top