|
-
Jul 31st, 2007, 11:16 AM
#1
Thread Starter
PowerPoster
xpath query
in .NET 1.1, I wish to do some xml searching/node searching using xpath and an xml string.
I have this xml here:
<caller><userid>{540C8042-A520-DC11-AE79-00132047A063}</userid><merchantid>{59344736-A520-DC11-AE79-00132047A063}</merchantid></caller>
how can I obtain the <userid> value (the GUID) from that given string?
-
Jul 31st, 2007, 12:21 PM
#2
Re: xpath query
So, you say that your info is in a string?
Code:
XmlDocument xd = new XmlDocument();
xd.LoadXml(xmlString);
XmlNode nod = xd.SelectSingleNode("/caller/userid");
MessageBox.Show(nod.InnerText);
-
Jul 31st, 2007, 12:49 PM
#3
Thread Starter
PowerPoster
Re: xpath query
thanks ill give that a bash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|