Ogun BALKAN

Ogun BALKAN

  • NA
  • 1
  • 0

(currentNode.SelectNodes) error

Sep 24 2007 2:58 AM
hi all,

this code (currentNode.SelectNodes) error. error is:
'System.Xml.XmlNode' does not contain a definition for 'SelectNodes'
help me please thanks



private void button1_Click(object sender, System.EventArgs e)
{
ScanCtrl.ScanRead();

string xmlnodename;
xmlnodename = "barkod";
XmlDocument doc = new XmlDocument();
doc.Load("\\My Documents\\Demirbaslar.xml");
XmlNode currentNode = doc.DocumentElement;
XmlNodeList results = currentNode.SelectNodes("//demirbas[" + xmlnodename + "='" + taranan.Text + "']");
int x;
DataSet ds = new DataSet();
XmlTextReader xReader;
for (x = 0; x <= results.Count - 1; x++)
{
xReader = new XmlTextReader(results.Item(x).OuterXml, XmlNodeType.Element, new XmlParserContext(null, null, null, XmlSpace.None));
ds.ReadXml(xReader, XmlReadMode.InferSchema);
}
barkod.Text = ds.Tables[0].Rows[0]["barkod"].ToString();
abfno.Text = ds.Tables[0].Rows[0]["abfno"].ToString();



Answers (1)