O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The System.Xml.Linq Namespace

The System.Xml.Linq namespace exposes objects for creating, reading, and manipulating Xml documents. All objects inherit from System.Xml.Linq.XObject. Table 28.1 summarizes and describes available objects.

Table 28.1 Objects Available in the System.Xml.Linq Namespace

image

You create an Xml document declaring an instance of the XDocument class:

Dim myDocument As New XDocument

When you have the instance you can add all acceptable objects mentioned in Table 28.1. The first required element is the Xml declaration that can be added as follows and that is mandatory:

myDocument.Declaration = New XDeclaration("1.0", "utf-8", "no") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required