XPath expressions are supported in .NET through the use of
XmlDocument
class.
You could start here:
XPath Syntax[
^]
XmlDocument Class[
^]
Hope this helps.
[EDIT] Added example with XmlNode
As I say in my comment, the
SelectSingleNode
method also exists for
XmlNode
class.
A (rough) translation of the java code could be:
XmlNode objRecordNode;
XmlNode objCurrentField;
public bool SetToFirstRecord()
{
try {
objCurrentField = objRecordNode.SelectSingleNode("./FIELD");
return (objCurrentField != null);
}
catch (Exception ex) {
Debug.WriteLine(string.Format("Error in setToFirstRecord of RecordObject {0}", e.Message()));
return false;
}
}
(rough because I do not use XML documents so often ; but I hope you got the idea)
[/EDIT]