Solved

VB Code and parsing XML Node

Posted on 2013-05-29
2
336 Views
Last Modified: 2013-06-04
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
Comment
Question by:lrbrister
2 Comments
 
LVL 11

Accepted Solution

by:
srikanthreddyn143 earned 500 total points
ID: 39206671
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
 

Author Closing Comment

by:lrbrister
ID: 39219412
Sorry for the late getback
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.Net - KeyPress Event 4 36
VB.net and sql server 4 35
Winform Module - What is the ASP.Net equiv 2 20
Call Controller Action Method from ASPX 2 14
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question