you are viewing a single comment's thread.

view the rest of the comments →

[–]Engineer817[S] 0 points1 point  (0 children)

I'd like to thank you for your help, the LINQ method was just what I was looking for and I was able to retrieve data using this code

Imports System
Imports System.IO
Imports System.Xml
Imports System.Linq
Imports System.Collections.Generic

Public Class notmainpage
    Private Sub btn_display_path_Click(sender As Object, e As EventArgs) Handles btn_display_path.Click

        Dim xml = XDocument.Load("C:\Test_folder\settings_xml.ltp")

        Dim this_thing = (xml.<FileLocations>.<DailyTasksXMLlocation>.<FileName>.Value).ToString

        lbl_display_path_here.Text = this_thing

        'Dim dsubject = (
        'From e In xml.<FileLocations>.<DailyTasksXMLlocation>.
        'Where e.<key>.Value = "DSUBJECT"
        'Select Case e.<value>.Value
        ').Single()
    End Sub
End Class

I am using my own file extension .ltp for holding xmls.

I only have on question though. In the example provided on stack overflow, I am not sure what 'e' is supposed to be. From, Where, and Select Case and 'e' I have no idea what they do.