Re: OT± insert xmltype

  • From: "M.Godlewski" <mcgodlewski@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Mon, 2 Aug 2004 07:37:18 -0700 (PDT)

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@xxxxxxxxxx> 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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: