Read XML in VB.net

后端 未结 4 2106
渐次进展
渐次进展 2021-02-09 08:47

I have googled for the last hour or so with no luck (I\'d like to think I\'m a great googler too!), so here I am.

I have an XML file that I\'m using for my programs sett

4条回答
  •  旧巷少年郎
    2021-02-09 09:31

    Ah, a perfect example for showing off the powerful XML features of VB.NET with Framework 3.5:

    Sub Main()
        Dim xml = XDocument.Load("config.xml")
        Console.WriteLine("Number: " & xml....Value)
        Console.WriteLine("Body: " & xml....Value)
    End Sub
    

    yields:

    Number: 0323
    Body: package received
    

提交回复
热议问题