XmlDocument and SelectSingleNode

S

Steven Edison

So as horrible as it sounds, we have some old Pocket PC's in the field
(2002), and I'm having to remake a newer app compatible with those units, so
I've re-installed VS 2003 and started a newer (older) version. I save my
app settings in an xmldocument. While trying to load them I starting typing
doc.DocumentElement.SelectSingleNode() and intellisense didn't include the
method. I looked it up on MSDN and it shows support all the way back to CF
2.0 but not 1. What was the traditional methods of doing XPath's before
SelectNodes and SelectSingleNode? I just need to get the innter text of a
given XPaths.

Thanks for your help!

Steven
 
S

Steven Edison

I got the values with a DataSet:

ds.ReadXml(new XmlNodeReader(doc));
if(ds.Tables[0].Rows[0] != null)
{
DataRow dr = ds.Tables[0].Rows[0];
if(dr["ValueName"] != null)
this.MyValue = (string)dr["ValueName"];
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top