HELP! XPath Syntax
-
Ok, I'll keep this as simple as possible. I need to Query an XML file and Return the "DataRow" Nodes that meet some criteria contained in more than one ChildNode of the Row. Keep in mind that I cannot simply make the ID's part of the "DataRow" node, because for every XML file, the IDs are totally different Columns (not by my design). Here's an example XML data: Ok, what I need to do is Select all "DataRow" nodes where the "DataColumn" matches the following criteria: @Name='DatabaseID' and @Value='1' and @Name='RowID' and @Value='1' Here's what I have so far, but I can't seem to match a DataRow to multiple criteria in the DataColumns: //DataRow/DataColumn[@Name='DatabaseID' and @Value='1']
-
Ok, I'll keep this as simple as possible. I need to Query an XML file and Return the "DataRow" Nodes that meet some criteria contained in more than one ChildNode of the Row. Keep in mind that I cannot simply make the ID's part of the "DataRow" node, because for every XML file, the IDs are totally different Columns (not by my design). Here's an example XML data: Ok, what I need to do is Select all "DataRow" nodes where the "DataColumn" matches the following criteria: @Name='DatabaseID' and @Value='1' and @Name='RowID' and @Value='1' Here's what I have so far, but I can't seem to match a DataRow to multiple criteria in the DataColumns: //DataRow/DataColumn[@Name='DatabaseID' and @Value='1']
//DataRow[ DataColumn/@Name='DatabaseID' and DataColumn/@Value='1' and DataColumn/@Name='RowID' and DataColumn/@Value='1']
"When the only tool you have is a hammer, a sore thumb you will have."
-
//DataRow[ DataColumn/@Name='DatabaseID' and DataColumn/@Value='1' and DataColumn/@Name='RowID' and DataColumn/@Value='1']
"When the only tool you have is a hammer, a sore thumb you will have."