all groups > dotnet xml > march 2006 >
You're in the

dotnet xml

group:

read and interpret xml string



read and interpret xml string Citizen10Bears NO[at]SPAM gmail.com
3/6/2006 12:44:33 PM
dotnet xml: hi all,
perhaps a simple question, but some guidance would be great...

I have a webservice that churns out XML.

I need to create a VB.NET app to call the webservice, read the XML
response, and then perhaps iterate through it to display the content in
listviews, treeviews and the like.

Any tips to get me started?

I have got as far as calling the webservice and returning the XML as a
string.
More specifically, I don't know how to use this string as XML and read
the nodes etc.

TIA

TIM
Re: read and interpret xml string Cerebrus
3/7/2006 4:11:16 AM
Hi TIM,

Since you've got to the point of returning the XML as a string, and now
you need to parse it into fields, check out this recent post which asks
the same question :

http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/384b52e77e5c81f4

In short, it recommends that you use the XmlDocument class to read the
XML string. All the nodes will then be available to you. What you do
next will depend on your plan of action thereafter.

As you indicated that you would want to display the data in a Treeview,
you can check out this article :

http://aspnet.4guysfromrolla.com/articles/051403-1.aspx

and this MSDN article :

http://msdn2.microsoft.com/en-us/library(d=robot)/7a9swst5.aspx

Hope this helps,

Regards,

Cerebrus.
Re: read and interpret xml string Citizen10Bears NO[at]SPAM gmail.com
3/12/2006 1:49:27 PM
thanks for that.

here is a related question...

In asp.net I just use an xml stylesheet and my xml is wonderfully
formatted. How can I achieve this in vb.net? Yes, I could just drop a
web browser onto the form, but I would need to be able to pick up
events from the browser in my exe.

any ideas? it must be a common problem.

thanks again
Tim
Re: read and interpret xml string Cerebrus
3/12/2006 7:30:10 PM
Hi,

[quoted text, click to view]

I think your question is better stated as : "How do I achieve this in
Windows Forms?"
since, VB.NET does not itself imply Windows Forms. You can use VB.NET
in ASP.NET development as well.

As for your answer, I think you should ask it as a new post, since I'm
not too sure about the answer.

Regards,

Cerebrus.
AddThis Social Bookmark Button