Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
(currentNode.SelectNodes) error
Ogun BALKAN
17y
2.1k
1
Reply
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();
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
NP43 Up-casting and Down-casting
Export excel