Chapter 13. XML in Modern Programming

XML has gained so much in popularity and acceptance that Microsoft has decided to promote XML to a basic data type. Yes, XML is a data type like integers and strings! To understand how far VB has taken XML, type the following in a procedure or event handler:

Dim products = <Books>
<Book ISBN="0000000000001">
  <Title>Book Title 1</Title>
  <Price>11.95</Price>
 </Book>
 <Book ISBN="000000000002">
    <Title>Book Title 2</Title>
    <Price>10.25</Price>
  </Book>
 </Books>

You need not worry too much about getting the document exactly right, because the Visual Studio's editor works just like the XML editor. Every time you type an opening tag, it inserts the matching closing tag and ensures that what you're typing is a valid XML ...

Get Mastering Microsoft® Visual Basic® 2010 now with the O’Reilly learning platform.

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