Click here to Skip to main content
15,887,446 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<sample-test-data-history xmlns="http://www.dmotorworks.com/sample-test-data-history">
  <payPaymentCode>
    <V Idx="1">CASH</V>
  </payPaymentCode>
  <Type>
      <V Idx="1">Cat</V>
      <V Idx="2">Mouse</V>
      <V Idx="3">Tree</V>
   </Type>
  <totMiscCost>
    <V Idx="1">100.00</V>
    <V Idx="2">150.00</V>
    <V Idx="3">200.00</V>
  </totMiscCost>
 
</sample-test-data-history>


What I have tried:

SELECT (xpath('(//dns:totMiscCost/dns:V[@Idx=
			  //dns:Type/dns:V[text()="Cat"]/@Idx]/text())[1]',
              nmuloc,
              ARRAY[ARRAY['dns',
                          'dmotorworks.com/sample-test-data-history']]))[1]
       FROM test;
Posted
Comments
Richard MacCutchan 16-Jan-19 9:49am    
Is this a question or a statement?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900