Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Community Wiki

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Navigation

Google Ads

Xlinq : get an elements value with VB.Net

From Wiki

Jump to: navigation, search

First we load the file.

  1. Dim _File As XElement = XElement.Load(GetFilename)


The next line takes out the Element we want. We don't need to specify the root element(a misstake I made the first time around.)

  1. Dim _Element As IEnumerable(Of XElement) = From c In _File.Elements("Element") Select c


The last line just takes the value of the element and puts it in a string value.

  1. _return = _Element.Value.ToString

357 Rating: 1.0/5 (3 votes cast)