Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I select an XML schema registered with Oracle?

Tags:

How do I select an XML schema previously registered with Oracle?

For example, if I've registered a schema like so:

DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'http://test.com/my-schema.xsd',
    SCHEMADOC => '...the xsd...,
    ...
);

I would like to be able to get that schema back, ideally something in the vein of:

select s.schemadoc
from magic_schema_table s
where s.schemaurl = 'http://test.com/my-schema.xsd'

Does such a mechanism exist?

like image 891
Brian Kent Avatar asked Dec 21 '09 16:12

Brian Kent


1 Answers

You can use the Datadictionary View ALL_XML_SCHEMAS.

SELECT SCHEMA
FROM   ALL_XML_SCHEMAS
WHERE  SCHEMA_URL = 'http://test.com/my-schema.xsd';
like image 84
Thomas Aregger Avatar answered Oct 14 '22 22:10

Thomas Aregger