Read XML in VB.net

后端 未结 4 1589
情歌与酒
情歌与酒 2021-02-09 08:45

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:30

    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
    

提交回复
热议问题