Solved

VB Code and parsing XML Node

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

11 Experts available now in Live!

Get 1:1 Help Now