Query with extractValue()
420739May 20 2004 — edited May 20 2004Hello,
I have the following XML-Document:
<ExampleXML>
<Order OrderNr="1500">
<Customer CustomerNr="781">
<Name>Burns</Name>
</Customer>
</Order>
<Order OrderNr="2479">
<Customer CustomerNr="575">
<Name>Simpson</Name>
</Customer>
</Order>
</ExampleXML>
I store this document in a table of XMLTYPE.
Now I want to perform the following query:
SELECT x.extract('//ExampleXML/Order/@OrderNr').getStringVal()
FROM myXMLTabelle x
where x.extract('//ExampleXML/Order/Customer/Name/text()').getStringVal() = 'Burns';
But there is no result, because the extract-function in the where-clause returns "BurnsSimpson".
Isn't it possible to execute such queries?
Is there another way to achieve my aim?
Thanks,
Torsten