Hi,
I have this code:
and i want the informatiom that i give. ('Pink') be given by a textbox
How can i do it? thanks
- private void button1_Click(object sender, EventArgs e)
- {
- XDocument doc = XDocument.Load(@"C:\Work\stores.xml");
-
- var xpath = "//store/Color[text() ='Pink']";
-
- var result = ((IEnumerable)doc.XPathEvaluate(xpath)).Cast<XElement>().FirstOrDefault();
- textBox1.Text = result.Value;
-
-
-
-
- }