How to: Access XML Child Elements (Visual Basic)

In this article

This example shows how to use a child axis property to access all XML child elements that have a specified name in an XML element. In particular, it uses the Value property to get the value of the first element in the collection that the name child axis property returns. The name child axis property gets all child elements named phone in the contact object. This example also uses the phone child axis property to access all child elements named phone that are contained in the contact object.

Compiling the Code

See Also

The feedback system for this content will be changing soon. Old comments will not be carried over. If content within a comment thread is important to you, please save a copy. For more information on the upcoming change, we invite you to read our blog post.