Find a node and it's matching descendant node in one query

TJCooper04

New Member
I have the following xml that I need to get 2 values (see * in comments) from within the same query:The two values are associated and I can get one set (\[code\]) or the other () but not using a single query.Update I updated the xml below to include 2 nodes that exist under the node and added the namespaceIdeally I would like to get them both in a single query into a Dictionary<root xmlns="http://www.blah.net/xsd/layout/2003-10-16"> <header/> <movement> <movementHeader> <desc>xyz</desc> </movementHeader> <detailHeader> <desc>abc</desc> </detailHeader> <detail> <!-- * need this value --> <code>90125</code> <subDetail> <!-- * and need this value at same time --> <amount>1200.00</amount> </subDetail> </detail> <detail> <!-- * need this value --> <code>90126</code> <subDetail> <!-- * and need this value at same time --> <amount>1300.00</amount> </subDetail> </detail> <detail> <!-- * need this value --> <code>9012</code> <subDetail> <!-- * and need this value at same time --> <amount>1400.00</amount> </subDetail> </detail> </movement>\[/code\]
 
Back
Top