Visual Basic includes two primary methods for working with XML content: the old way and the new way. The old way uses classes from the
System.Xml namespace, and provides traditional object-based access to XML tags, attributes, and data. The new way, introduced in the 2008 release, uses classes in the
System.Xml.Linq namespace, and provides access to XML content directly within the syntax of Visual Basic source code. I'll discuss both methods in this chapter, starting with the old way.
Since XML is no fun to manage as a big chunk of text, .NET includes several classes that manage XML data. All of these tools appear in the
System.Xml namespace and its subordinate namespaces:
The main collection of old-way XML-related classes.
Classes that integrate XML with LINQ technologies. This is the new way that I'm going to talk about later.
Classes that create and use XSD schemas.
Classes that read and write XML documents via a standard .NET stream.
Classes that implement the XPath technology used to search XML documents.
Classes that enable XSL Transformations.
The features included in each class tie pretty closely to the structure of XML and related technologies such as XSD and XSLT.
System.Xml namespace includes the most basic classes you will use to manage XML data. An
XmlDocument object is the in-memory view of your actual XML document: ...