Solved

VB Code and parsing XML Node

Posted on 2013-05-29
2
334 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now