J
John Bailo
Is anyone familar with the correct syntax for using ancestor:: ?
I am trying to use it in a c# application, and I am also testing it in a
parser application called Cooktop ( http://www.xmlcooktop.com )
I cannot get it or my c# code to return a node list when using ancestor.
Is ancestor:: something that .NET does or does not support?
Examples, none of these work:
nodes://pallet/ancestor:osition
<!--nodes xpath //pallet/ancestor:osition'-->
<!--nodes xpath parent::*/pallet/position/*'-->
<!--nodes xpath parent::*//pallet/position/*'-->
<!--nodes xpath /ancestor:osition/client[@id='MDR']'-->
<!--nodes xpath /pallet/ancestor:osition/client[@id='MDR']'-->
<!--nodes xpath /pallet/position/ancestor::client[@id='MDR']'-->
for
<pallet>
<position row="0" bay="0" level="A">
<client id="HAL">
<partnum id="HA0132-1033 " isStock="N">HA0132-1033 </partnum>
<partnum id="HA9027EP " isStock="Y">HA9027EP </partnum>
</client>
<client id="MDR">
<partnum id="A/P FILES " isStock="N">A/P FILES </partnum>
</client>
<client id="OPS">
<partnum id="OPS " isStock="N">OPS
</partnum></client>
</position>
<position row="1" bay="1" level="B">
<client id="MDR">
<partnum id="A/P FILES " isStock="N">A/P FILES
</partnum>
</client>
</position>
<position row="1" bay="1" level="D">
<client id="MDR">
<partnum id="X-MAS DECORATION" isStock="N">X-MAS DECORATION
</partnum>
</client>
</pallet>
I am trying to use it in a c# application, and I am also testing it in a
parser application called Cooktop ( http://www.xmlcooktop.com )
I cannot get it or my c# code to return a node list when using ancestor.
Is ancestor:: something that .NET does or does not support?
Examples, none of these work:
nodes://pallet/ancestor:osition
<!--nodes xpath //pallet/ancestor:osition'-->
<!--nodes xpath parent::*/pallet/position/*'-->
<!--nodes xpath parent::*//pallet/position/*'-->
<!--nodes xpath /ancestor:osition/client[@id='MDR']'-->
<!--nodes xpath /pallet/ancestor:osition/client[@id='MDR']'-->
<!--nodes xpath /pallet/position/ancestor::client[@id='MDR']'-->
for
<pallet>
<position row="0" bay="0" level="A">
<client id="HAL">
<partnum id="HA0132-1033 " isStock="N">HA0132-1033 </partnum>
<partnum id="HA9027EP " isStock="Y">HA9027EP </partnum>
</client>
<client id="MDR">
<partnum id="A/P FILES " isStock="N">A/P FILES </partnum>
</client>
<client id="OPS">
<partnum id="OPS " isStock="N">OPS
</partnum></client>
</position>
<position row="1" bay="1" level="B">
<client id="MDR">
<partnum id="A/P FILES " isStock="N">A/P FILES
</partnum>
</client>
</position>
<position row="1" bay="1" level="D">
<client id="MDR">
<partnum id="X-MAS DECORATION" isStock="N">X-MAS DECORATION
</partnum>
</client>
</pallet>