Introducing The System.Xml Namespace


Support for processing XML is provided by the classes in the System.Xml namespace in .NET. This section looks (in no particular order) at some of the more important classes that the System.Xml name- space provides. The following table lists the main XML reader and writer classes.

Class Name

Description

XmlReader

An abstract reader class that provides fast, non-cached XML data. XmlReader is forward-only, like the SAX parser.

XmlWriter

An abstract writer class that provides fast, non-cached XML data in stream or file format.

XmlTextReader

Extends XmlReader. Provides fast forward-only stream access to XML data.

XmlTextWriter

Extends XmlWriter. Fast forward-only generation of XML streams.

The following table lists some other useful classes for handling XML.

Class Name

Description

XmlNode

An abstract class that represents a single node in an XML document. Base class for several classes in the XML namespace.

XmlDocument

Extends XmlNode. This is the W3C DOM implementation. It provides a tree representation in memory of an XML document, enabling navigation and editing.

XmlDataDocument

Extends XmlDocument. This is a document that can be loaded from XML data or from relational data in an ADO.NET DataSet. Allows the mixing of XML and relational data in the same view.

XmlResolver

An abstract class that resolves external XML-based resources such as DTD and schema references. Also used to process <xsl:include> and <xsl:import> elements.

XmlUrlResolver

Extends XmlResolver. Resolves external resources named by a uniform resource identifier (URI).

Many of the classes in the System.Xml namespace provide a means to manage XML documents and streams, whereas others (such as the XmlDataDocument class) provide a bridge between XML data stores and the relational data stored in DataSets.

Important

It is worth noting that the XML namespace is available to any language that is part of the .NET family. This means that all of the examples in this chapter could also be written in Visual Basic .NET, managed C++, and so on.




Professional C# 2005
Pro Visual C++ 2005 for C# Developers
ISBN: 1590596080
EAN: 2147483647
Year: 2005
Pages: 351
Authors: Dean C. Wills

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net