Skip to Main Content

DevOps, CI/CD and Automation

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!

How to Get xml Attribute value from a given xpath

807961Oct 25 2010 — edited Oct 25 2010
i'm building an xml from 3 columns a,b,c using 'SELECT EXTRACT (XMLELEMENT ("ROOT",.........)'
and my xml looks something like this
<ROOT>
<categories>
<catogory value="col a value" display="true"/>
<catogory value="col b value" display="false"/>
<catogory value="col c value" display="false"/>
</categories>
<DATAS>
**
**
**
**
</DATA>
</ROOT>

now under the datas node i want to use xpath like this
(case when '/root/categories/catogory/[@display="true"]' then '/root/categories/catogory/@value' else 0 end)
so tat i get values under data node based on display attributes.... is it possible..
if not is ther any alternative way of using xpath
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2010
Added on Oct 25 2010
1 comment
492 views