XMLDB tips: #1. Show XMLType in SQL*plus
Suppose you have an object type named EMPLOYEE_T in the hr schema and want to generate an XSD. This is standard functionality that is offered by XMLDB. You can execute the following statement:
select DBMS_XMLSCHEMA.generateSchema('HR', 'EMPLOYEE_T', 'employee') from dual;
The result is the XSD that is returned as an XMLType. Different tools have different ways of dealing with this.
SQL*plus
The result will only be partially visible.The way to solve this is to set the long size:
SQL>set long 100000 pages 0
SQLDeveloper
In SQL developer, you can select an XML document, it will display the entire document in one big line. You can view the entire document by clicking on the three dots (…) at the right hand side. When you copy this, pay attention: a lot of trailing whitespaces are included. We managed to downsize the document from approximately 3 MB to 150 kb, just by removing these trailing spaces!
JDeveloper10g
Unfortenately, this approach does not work in JDeveloper. If you execute the statement in a SQL Worksheet, it shows an empty cell as a result.
Comments: (2)
I know, I am working on fixing it. In the mean time try:
http://www.approach-alliance.nl/index.php?option=com_jd-wp&Itemid=2&feed=rss
Blogs
- 25 Feb
-
05 Nov
Some tips & tricks on migrating SOA Suite 10g to 11g – Part 2
- 04 Nov
- 02 Nov
- 25 Oct
- 20 Oct
- 15 Oct
- 11 Oct
- 03 Oct
- 31 Jul
Sorry. No data so far.
Loading ...
Nice blog. Unfortunately both feeds are broken. I am unable to subscribe to it. It gives back an XML parsing error in FF.