• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 731
  • Last Modified:

hot to parse xml using xpath in pl/sql

hi
so far i had been using dbms_lob.instr/substr...to extract node value from the xml stored as clob in my oracle.
                     start_position := dbms_lob.instr(r1.xml_data,'<Exception>',1,1) + 11;
                     end_position  := dbms_lob.instr(r1.xml_data, '</Exception>', start_position, 1);
                     xmldata := dbms_lob.substr(r1.xml_data, end_position - start_position, start_position);
now i want to use xpath; because i have a specific case which can be resolved using xpath. i ve this xpath which returns 4 lines to me in the xml file(using its xpath feature)
//SubSheet/DeatiledParameters/*/Pass[text()='false']/..

can someone help me share how i can use this xpath in oracle pl/sql?
thanks a lot
0
samir25
Asked:
samir25
  • 2
  • 2
1 Solution
 
slightwv (䄆 Netminder) Commented:
As I've pointed out in previous questions, you can use EXTRACTVALUE or EXTRACT.  As you already know, the data has to be XMLTYPE and not CLOB.


I assume this is the same data from your previous questions and still can't cast it as XMLTYPE?

If you can provide some sample data and expected results I'll provide a working example.
0
 
samir25Author Commented:
you can delete the other one ...as this ques is more elaborate and the other one is generic. and if you had read carefully...the ques is diff from the past one.i want some xpath things to be done. dont know how.
here is what want to do
//SubSheet/DeatiledParameters/*/Pass[text()='false']/..
can you help on this?
0
 
slightwv (䄆 Netminder) Commented:
I've deleted the other one as you requested.

Since you've accepted an answer I assume you no longer need assistance with this question.

If you still need assistance please provide the data I requested above and I'll unaccept the answer and continue helping you.

The data I requested above::
"If you can provide some sample data and expected results I'll provide a working example."
0
 
samir25Author Commented:
yes i resolved this tough i am stuck at a dif place for which i will float sep ques
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now