Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2012 New to this whole XML XDocument world

$
0
0
I have the following code that I was assisted with in another thread...

Code:

Dim xd As XDocument = sendRequest(actionXml.ToString)

Dim elems = xd.<txtsig_response>.<content>.<item>
Dim successNode = From el In elems.<element> Where el.@name = "success"
Dim v0 As Boolean = Boolean.Parse(successNode(0).Value)
Dim nameNode = From el In elems.<element> Where el.@name = "contact_id"
Dim v1 As String = nameNode.First.Value

I added the AS BOOLEAN and AS STRING - just because I could...

But I don't know what to make the other ones - are they supposed to be left like that?

Also - when adding a watch to one of these it says that it's an In-Memory Queue and that expanding it will process the collection.

Does that mean if I examine something it won't allow me to move forward in code that wants to expand that same area?

Also - what if "success" is never found - that type of thing - how does this gracefully continue through problems like that??

Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>