Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 363
  • Last Modified:

VB Code and parsing XML Node

I am making an http porst to a url and getting an xml response (CSTA Standards)

In the xml is a RESULT node as you can see in the screen print
Inside the result node, the very next node is what KIND of result it is

In the screen print case it's a MonitorStartResponse

I need VB code to capture that "Type" of response and pass it along in my application as som variablespI am making an http porst to a url and getting an xml response (CSTA Standards)

In the xml is a RESULT node as you can see in the screen print
Inside the result node, the very next node is what KIND of result it is

In the screen print case it's a MonitorStartResponse

I need VB code to capture that "Type" of response and pass it along in my application as some variable

sp
0
lrbrister
Asked:
lrbrister
1 Solution
 
srikanthreddyn143Commented:
try this

  Dim oXMl As New Xml.XmlDocument()
        oXMl.LoadXml("<org.response><errorcount>0</errorcount><Id>1</Id><Result xmlns:xsi=""test"" xsi:type=""test1"" ><testmonitor>test</testmonitor></Result></org.response>")
        Dim oXMLNode As Xml.XmlNodeList = oXMl.SelectNodes("//Result")
        Dim sAttribute As String = ""
        sAttribute = oXMLNode(0).Attributes("xsi:type").Value
        Console.Write(sAttribute)

Open in new window

0
 
lrbristerAuthor Commented:
Sorry for the late getback
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now