I want to select an xml node with a conditional Xpath like -
xmlnode.SelectSingleNode("if (ns:substanceAdministration/ns:consumable/@typeCode == UNK) then evaluateThisXpath else evaluateOtherXpath")
my concern is
<drugID code="UNK"> <sub code="2232" /> </drugID>
If the @code of the parent node is a UNK, then it must take the @code value of the child node; otherwise, it must take the value of the parent @code.
xml xpath selectnodes
patel
source share