sql - Extract values from XML string using oracle xml commands -


i want extract values of attributes active_ind , call_status following string:

<insurance_history active_ind="y" call_status="a"/> 

i have sorted issue substring , instr, need use xml commands extract these values.

xpath, xquery, recommend read these technology. @ used access attribute in xml elment

select extract(xmltype('<insurance_history active_ind="y" call_status="a"/>'),'/insurance_history/@active_ind')  active_ind , extract(xmltype('<insurance_history active_ind="y" call_status="a"/>'),'/insurance_history/@call_status') call_status   dual; 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -