XML search
-
Hi, I'm looking to search through child nodes, and then capture the value of the node and also that of the parent node. For example, the user enters details into a field, which then gets checked against the child node, if matched then it gets the value of that node and also the parent value. Which then will be populated into a treeView I'm trying to use XMLPathNavigator and it doesn't appear to be working. Any ideas? Or other ways to attempt this. I'm using c#.net 2005 to do this. It sounds extremely easy, but just can't get it to work. Cheers... Dan Cheers.. Dan
-
Hi, I'm looking to search through child nodes, and then capture the value of the node and also that of the parent node. For example, the user enters details into a field, which then gets checked against the child node, if matched then it gets the value of that node and also the parent value. Which then will be populated into a treeView I'm trying to use XMLPathNavigator and it doesn't appear to be working. Any ideas? Or other ways to attempt this. I'm using c#.net 2005 to do this. It sounds extremely easy, but just can't get it to work. Cheers... Dan Cheers.. Dan
Perform the search in XPathDocument or XmlDocument by using SelectSingleNode method. When element is found it is easy to navigate back to the parent node (ParentNode property). Best regards, ----------- Igor Sukhovhttp://sukhov.net