Tip

Compose XML more quickly using Visual Basic 9

New aspects of Visual Basic 9.0 help developers pare down the amount of code needed to create an object in XML and to access specific areas within an existing XML object. Understanding how VB 9.0 streamlined the process and opened itself up to more sophisticated features is a big part of getting up to speed with the newest Visual Studio tools.

A major objective of VB 9.0 is to connect XML to Language Integrated Queries (LINQs). VB 9.0 accomplishes this goal with an API called "LINQ to XML," which Visual Basic provides you with as soon as you write normal XML.

Writing code becomes easier with the addition of XML literals, a device intended to streamline the composition process. Code composed through XML literals becomes an object in LINQ to XML form.

While XML literals help with writing, XML axis properties help with accessing areas of existing XML. There are several property types that you can use to search for particular areas, including the child, attribute and descendent axes. These property types let you access material with a minimum of code writing.

VB 9.0 offers a higher level of support for XML to reduce the amount of code you have to write. Developers should be aware that in the new version of VB, the compiler takes over much of the developer's job, exploiting VB 9.0's XML literals and the XML axis properties. The decrease in the volume of code is intended to simplify the process of writing XML and make life easier for developers.

To learn more about the mechanics of XML literals and how they reduce your code-writing, check out this section on XML Literals on MSDN. For a broader look at VB 9.0's new features, see here. And for the full guide to XML in VB 9.0, look here.


This was first published in August 2008

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.