Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle 9202 XPath query question

Oracle 9202 XPath query question

From: John <rjg96_at_yahoo.com>
Date: 24 Nov 2003 21:22:52 -0800
Message-ID: <63394c1f.0311242122.6c913667@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US