Chapter 9. Using XML with Visual Basic

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Learn the rationale behind XML

  • Learn about the namespaces within the .NET Framework Class Library that deal with XML and XML-related technologies

  • Look at some of the classes contained within these namespaces

  • How to use LINQ to XML to read and edit XML

  • How Visual Basic enables the use of XML literals within your code

  • Learn how lambdas are used with Visual Basic and LINQ

  • How you can create your own lambda expressions to create more generic code

This chapter describes how you can generate and manipulate Extensible Markup Language (XML) using Visual Basic 2010. The .NET Framework exposes many XML-specific namespaces that contain over 100 different classes. In addition, dozens of other classes support and implement XML-related technologies, such as those provided in ADO.NET, SQL Server, and BizTalk. Consequently, this chapter focuses on the general concepts and the most important classes.

Visual Basic relies on the classes exposed in the following XML-related namespaces to transform, manipulate, and stream XML documents:

  • System.Xml provides core support for a variety of XML standards, including DTD (Document Type Definition), namespace, DOM (Document Object Model), XDR (XML Data Reduced – an old version of the XML schema standard), XPath, XSLT (XML Transformation), and SOAP (formerly Simple Object Access Protocol, now the acronym doesn't stand for anything).

  • System.Xml.Serialization provides the objects used to transform ...

Get Professional Visual Basic® 2010 and .NET 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.