Home » Developer & Programmer » JDeveloper, Java & XML » Oracle XML Parsing (Oracle 9.2.0.8)
Oracle XML Parsing [message #613563] Thu, 08 May 2014 00:17 Go to next message
sarankumar.ds
Messages: 3
Registered: May 2014
Location: Hyderabad
Junior Member
Hi,

Currently i am using Oracle 9.2.0.8 version and planning to implement XML parsing.

to parse the XML in pl/sql is it require to create XDB schema or is there any way to create built in DBMS xml procedures under sys schema.

Currently in my database XDB is not yet created.

Please advice.


Thanks,
Saran
Re: Oracle XML Parsing [message #613564 is a reply to message #613563] Thu, 08 May 2014 01:11 Go to previous messageGo to next message
Michel Cadot
Messages: 59427
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Are you sure that EXTRACT and EXTRACTVALUE SQL functions require XDB?
Post the result of
select comp_id, status from dba_registry order by 1;


[Updated on: Thu, 08 May 2014 01:11]

Report message to a moderator

Re: Oracle XML Parsing [message #613566 is a reply to message #613564] Thu, 08 May 2014 02:08 Go to previous messageGo to next message
sarankumar.ds
Messages: 3
Registered: May 2014
Location: Hyderabad
Junior Member
Please find the below query results

select comp_id, status from dba_registry order by 1;

COMP_ID STATUS
------------------------------ -----------
CATALOG VALID
CATPROC VALID
Re: Oracle XML Parsing [message #613567 is a reply to message #613566] Thu, 08 May 2014 02:33 Go to previous messageGo to next message
Michel Cadot
Messages: 59427
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Can you execute the following test case:
drop table t;
create table t (val varchar2(100));
insert into t values ('<?xml version="1.0" encoding="UTF-8"?>
<test>
  <value>Michel</value>
</test>');
commit;
select extractvalue(xmltype(val),'//value') value from t;

You should get something like:
SQL> create table t (val varchar2(100));

Table created.

SQL> insert into t values ('<?xml version="1.0" encoding="UTF-8"?>
  2  <test>
  3    <value>Michel</value>
  4  </test>');

1 row created.

SQL> commit;

Commit complete.

SQL> select extractvalue(xmltype(val),'//value') value from t;
VALUE
-----------------------------------------------------------------------
Michel

1 row selected.

Re: Oracle XML Parsing [message #613579 is a reply to message #613567] Thu, 08 May 2014 03:37 Go to previous messageGo to next message
sarankumar.ds
Messages: 3
Registered: May 2014
Location: Hyderabad
Junior Member
execute the test case and got the results as specified.

As per the project requirement no need to insert the XML format data into a table.

Application calls the procedure by passing clob as parameter, which contains input xml format data.

Procedure will parse the clob and insert the records into a table.
for parsing dbms_xmlparser package is required, which is not available currently in my database.

My question is to get the parsing related XML built in procedures is it requires XDB schema creation or is there any way to create pl/sql xml API in database.

Please let me know your inputs.

Re: Oracle XML Parsing [message #613585 is a reply to message #613579] Thu, 08 May 2014 05:42 Go to previous message
Michel Cadot
Messages: 59427
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

The tesr case is ONLY to see if you can use SQL XML functions? It does not intend to directly address your problem just to see what you can do to address it.

Quote:
My question is to get the parsing related XML built in procedures is it requires XDB schema creation or is there any way to create pl/sql xml API in database.


This is exactly the purpose of the test case.

Previous Topic: Troubleshooting Java processes in OS
Next Topic: JDeveloper - Problem with BSSV Proxy & classes
Goto Forum:
  


Current Time: Sat Oct 25 17:28:17 CDT 2014

Total time taken to generate the page: 0.20465 seconds