<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Creating an XMLType based on Object Types</title>
	<atom:link href="http://technology.amis.nl/2010/12/23/creating-an-xmltype-based-on-object-types/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2010/12/23/creating-an-xmltype-based-on-object-types/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=creating-an-xmltype-based-on-object-types</link>
	<description></description>
	<lastBuildDate>Tue, 11 Jun 2013 22:09:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: tokke</title>
		<link>http://technology.amis.nl/2010/12/23/creating-an-xmltype-based-on-object-types/#comment-6431</link>
		<dc:creator>tokke</dc:creator>
		<pubDate>Wed, 08 Feb 2012 15:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=9473#comment-6431</guid>
		<description><![CDATA[alex, great blog, as usual. thanks. one question remains. i can&#039;t appreciate the last definition of the type called all_departments_ot.
in the query without the xmltype you don&#039;t use it. in the one that includes the xmltype you do. can you explain that difference, and the need for the use of the all_departments_ot?
much obliged,
Â 
-t-]]></description>
		<content:encoded><![CDATA[<p>alex, great blog, as usual. thanks. one question remains. i can&#8217;t appreciate the last definition of the type called all_departments_ot.<br />
in the query without the xmltype you don&#8217;t use it. in the one that includes the xmltype you do. can you explain that difference, and the need for the use of the all_departments_ot?<br />
much obliged,<br />
Â <br />
-t-</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Gralike</title>
		<link>http://technology.amis.nl/2010/12/23/creating-an-xmltype-based-on-object-types/#comment-6430</link>
		<dc:creator>Marco Gralike</dc:creator>
		<pubDate>Thu, 23 Dec 2010 18:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=9473#comment-6430</guid>
		<description><![CDATA[&lt;p&gt;Oh, I agree, just pointed out that in this case it might also be solved via a simple select within XMLTYPE(CURSOR())&lt;/p&gt;]]></description>
		<content:encoded><![CDATA[<p>Oh, I agree, just pointed out that in this case it might also be solved via a simple select within XMLTYPE(CURSOR())</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Nuijten</title>
		<link>http://technology.amis.nl/2010/12/23/creating-an-xmltype-based-on-object-types/#comment-6429</link>
		<dc:creator>Alex Nuijten</dc:creator>
		<pubDate>Thu, 23 Dec 2010 15:43:30 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=9473#comment-6429</guid>
		<description><![CDATA[&lt;p&gt;@Marco,&lt;/p&gt;
&lt;p&gt;Personally I find the Object Types (with the CASTs and COLLECTs) a lot easier to read (and write) than using XMLType (with all the XMLElement, XMLAgg and so on).&lt;/p&gt;
&lt;p&gt;Thank you for your comment.&lt;/p&gt;]]></description>
		<content:encoded><![CDATA[<p>@Marco,</p>
<p>Personally I find the Object Types (with the CASTs and COLLECTs) a lot easier to read (and write) than using XMLType (with all the XMLElement, XMLAgg and so on).</p>
<p>Thank you for your comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Gralike</title>
		<link>http://technology.amis.nl/2010/12/23/creating-an-xmltype-based-on-object-types/#comment-6428</link>
		<dc:creator>Marco Gralike</dc:creator>
		<pubDate>Thu, 23 Dec 2010 15:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=9473#comment-6428</guid>
		<description><![CDATA[&lt;p&gt;The problem with object types is that complex nested structures will have very fast the same issue as your first XML/SQL example.&lt;/p&gt;
&lt;p&gt;Based on your needs the easiest way to achieve this would be to use your query as input for XMLTYPE which can handle CURSOR constructs to for example:&lt;/p&gt;
&lt;p&gt;select XMLTYPE(CURSOR( select d.department_name, d.manager_id, e.first_name, e.last_name, e.manager_id from departments d join employeesÂ Â  e on d.department_id = e.department_id where d.department_id = 20)) FROM DUAL;&lt;/p&gt;
&lt;p&gt;Be aware that the &quot;pretty print&quot; format is not needed and creates overhead for the XML parser. Use XMLSerialize to bring it back to one big string without all the CR/LF and whitespace, if needed (this is the default in Oracle 11g and onwards)&lt;/p&gt;
&lt;p&gt;Â &lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&quot;number&quot;&gt;&lt;/td&gt;
&lt;td class=&quot;content&quot;&gt;&lt;code class=&quot;sql plain&quot;&gt;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;]]></description>
		<content:encoded><![CDATA[<p>The problem with object types is that complex nested structures will have very fast the same issue as your first XML/SQL example.</p>
<p>Based on your needs the easiest way to achieve this would be to use your query as input for XMLTYPE which can handle CURSOR constructs to for example:</p>
<p>select XMLTYPE(CURSOR( select d.department_name, d.manager_id, e.first_name, e.last_name, e.manager_id from departments d join employeesÂ Â  e on d.department_id = e.department_id where d.department_id = 20)) FROM DUAL;</p>
<p>Be aware that the &#8220;pretty print&#8221; format is not needed and creates overhead for the XML parser. Use XMLSerialize to bring it back to one big string without all the CR/LF and whitespace, if needed (this is the default in Oracle 11g and onwards)</p>
<p>Â </p>
<table>
<tbody>
<tr>
<td class="number"></td>
<td class="content"><code class="sql plain"></code></td>
</tr>
</tbody>
</table>
]]></content:encoded>
	</item>
</channel>
</rss>
