Thursday, March 18, 2010

Fun with XML on Oracle - XMLTypes

To register a schema in oracle do below:
1. drop directory XMLDIR;
2. create directory XMLDIR as 'C:\';
3. select * from ALL_DIRECTORIES
4.
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'C:\oracle9i\admin\TEST\utl_file\test.xsd',
SCHEMADOC => bfilename('XMLDIR','test.xsd'),
CSID => nls_charset_id('AL32UTF8'));
5. desc DBMS_XMLSCHEMA confirms that registerSchema exists

Gotchas:
error: ORA-01031: insufficient privileges


No comments: