Jump to content

how to select certain xml group based on attribute id and return as xmltype


Recommended Posts

hi,i have an xmltype column name "NM" in table "XMLTEST", the content of the xml in NM is<ct><sp id="ALEX"><sp id="JOHN"><sp id="MIKE"><sp id="CALEB"/><sp id="PAUL"/></sp></sp><sp id="MAX"><sp id="WAYNE"/></sp><sp id="MAX"/></sp></ct>The group i want to select is ALEX except group "MIKE" and "MAX", which return<ct><sp id="ALEX"><sp id="JOHN"/><sp id="SEAN"/></sp></ct>Is it possible? i'm processing this using stored procedure PL/SQL, my environment is 11g R2 Win 32bit.please advice

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...