Solved

VB Code and parsing XML Node

Posted on 2013-05-29
2
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 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