Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using XPath with SQL to extract XML data

HouseofHungerMay 15 2012 — edited May 15 2012
Given data such as this one:
<?xml version="1.0"?>
<ExtendedData>
   <Parameter name="CALLHOLD"><BooleanValue>true</BooleanValue></Parameter>

  <Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>

  <Parameter name="ALLCF"><BooleanValue>true</BooleanValue></Parameter>

  <Parameter name="RealProv"><BooleanValue>false</BooleanValue></Parameter>

</ExtendedData>
I normally use extractValue function as shown below for example to extract the value for the last parameter in the data above, e.g:
select extractValue(extended_data,'/ExtendedData/Parameter[@name="RealProv"]/BooleanValue') "my_column_alias" from table
Any ideas on how I may return the value of the parameter xsi:nil from this node:
<Parameter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BARRING_PASSWORD" xsi:nil="true"/>
I'd like to extract the
true
in
xsi:nil="true"
...

Thanks,

Edited by: HouseofHunger on May 15, 2012 2:13 PM

Edited by: HouseofHunger on May 15, 2012 2:13 PM
This post has been answered by odie_63 on May 15 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2012
Added on May 15 2012
2 comments
865 views