Did u try the below code block (by replacing the namespace of xml u r getting) that I posted in an another thread of urs 'http://forums.asp.net/t/1772979.aspx/1?simple+select+node'. I have tested this block and it should work for you.
XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);
nsmgr.AddNamespace("web", "http://SomeNamespace");
var totalresults = xmlDoc.SelectSingleNode("//web:Website/web:Total", nsmgr).InnerText;
Glad to know that finally you have got the solution. Will you share it here on the forum. It would facilitates
others users to find out the exact solution.
Thanks..
Please "Mark As Answer;", if this Post helps you.
Visit My Blog
jbear123
Member
558 Points
1256 Posts
Re: xml selecting single node?
Feb 28, 2012 12:44 PM|LINK
hi, thanks, no luck though. I'll keep trying different things
Ramesh T
Contributor
5171 Points
833 Posts
Re: xml selecting single node?
Feb 28, 2012 01:56 PM|LINK
Hello Mate,
Did u try the below code block (by replacing the namespace of xml u r getting) that I posted in an another thread of urs 'http://forums.asp.net/t/1772979.aspx/1?simple+select+node'. I have tested this block and it should work for you.
XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable); nsmgr.AddNamespace("web", "http://SomeNamespace"); var totalresults = xmlDoc.SelectSingleNode("//web:Website/web:Total", nsmgr).InnerText;jbear123
Member
558 Points
1256 Posts
Re: xml selecting single node?
Feb 28, 2012 02:13 PM|LINK
Thanks, I think ive done it using your select single node code mixed with previous suggestions on this thread.
Thanks again!
kuber.manral
Contributor
3051 Points
714 Posts
Re: xml selecting single node?
Feb 28, 2012 03:23 PM|LINK
Hi Jbear123,
Glad to know that finally you have got the solution.
Will you share it here on the forum. It would facilitates
others users to find out the exact solution.
Thanks..
Visit My Blog
jbear123
Member
558 Points
1256 Posts
Re: xml selecting single node?
Feb 28, 2012 04:57 PM|LINK
sorry, scrap that, turns out it just hid the error message i was getting. ill make another post with the latest code