Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle 9202 XPath query question
I would like to construct an xpath query that filters out nodes of a
certain name. I've successfully done this using various Xpath query
testers, but when I try this in Oracle (on the XML demo database), it
returns all of the nodes including the ones that I said to avoid:
select extract(value(x), '//*[name()!="Actions"]') from purchaseorder
x;
This returns all of the PurchaseOrders and within each the Actions
nodes are included (which I did not want)
Strangely, the reverse case (selecting only nodes of a certain name)
works fine:
select extract(value(x), '//*[name()="Actions"]') from purchaseorder
x;
Correctly returns:
<Actions>
<Action>
<User>KING</User>
</Action>
</Actions>
<Actions>
<Action>
<User>KING</User>
</Action>
</Actions>
Any help would be greatly appreciated.
Thanks,
Rob
Received on Mon Nov 24 2003 - 23:22:52 CST
![]() |
![]() |