Convert WebClient to XmlElement. VB.NET

I have link to API.XML and need to convert its data to XmlElement for further iteration

My solution is:

dim wc as WebClient = new WebClient()
wc.DownloadFile("http://192.168.88.11:8088/api", "C:\Users\admin\Desktop\getxml.xml")
dim doc as XmlDocument = new XmlDocument()
doc.Load("C:\Users\admin\Desktop\getxml.xml")
dim x as XmlElement = doc.DocumentElement

Is there more proper way without saving it to file?


Ответы (1 шт):

Автор решения: svetotehnik

Решение оказалось проще

Dim x As New XmlDocument()
x.Load("http://192.168.88.61:8088/api")
→ Ссылка