Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: OTą insert xmltype

Re: OTą insert xmltype

From: M.Godlewski <mcgodlewski_at_yahoo.com>
Date: Mon, 2 Aug 2004 07:37:18 -0700 (PDT)
Message-ID: <20040802143718.16551.qmail@web42006.mail.yahoo.com>


Jeroen,  

You can run your inserted xml doc through a validation program to ensure it matches the schema. I always use the http://apps.gotdotnet.com/xmltools/xsdvalidator/ link to check if mine is valid. I find Xmlspy has some errors this validator will catch.  

Secondly, you can post your question on the db xml forum. Mark Drake is very good at answering the questions there. It may take a day or two for him to reply, but he can usually solve these issues. Jeroen van Sluisdam <jeroen.van.sluisdam_at_vrijuit.nl> wrote: Í have defined very simple schema
declare
doc varchar2(1000) := '

';
begin
dbms_xmlschema.registerschema('http://www.oracle.com/simpletest2.xsd', doc );
end;
This works fine

SQL> l
1 create table simplexml(
2 id number,
3 msg sys.XMLType )
4* xmltype column msg XMLSCHEMA "http://www.oracle.com/simpletest2.xsd" element "message"

This also works

Problem comes here
insert into simplexml (id, msg) values (1, xmltype(' *
ERROR at line 1:
ORA-19007: Schema and element do not match

SQL> l
1 insert into simplexml (id, msg) values (1, xmltype(' 2 3 xmlns:xs="http://www.oracle.com/simpletest2.xsd" 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema" 5 xsi:schemaLocation="http://www.oracle.com/simpletest2.xsd"> 6 "test"
7
8* '))
SQL> What is wrong, please help this gives me a headache

Tnx,

Jeroen

P.S. Any other forums besides otn known about xml and oracle !



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
                

Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Mon Aug 02 2004 - 09:33:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US