Extra nesting using DBMS_XMLGEN.getxml and Cursor expression <xmltag_ROW>

From: Joel Slowik <jslowik_at_cps92.com>
Date: Thu, 1 Dec 2011 19:02:13 -0500
Message-ID: <7FCAE6F848605649B090362F7C518C4804DBD8F3_at_cpsexchange.cps92.com>

I've been searching the documentation and google but I can't seem to find what I am looking for.

Let's use this simple query:

select dbms_xmlgen.getxml('select cursor(select ''1'' "one", ''2'' "two", ''3'' "three" from dual) "numbers" from dual') from dual;

the result is:

"<?xml version="1.0"?>




Question1: Why was <numbers_row> created when <numbers> is sufficient (at least for my purposes)?

Question2: Can I get rid of that extra nesting with the xmlgen package or some other package? I'm using regular expressions to do so but it seems a bit unreasonable.

Thank you,

Confidentiality Note: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact Continuum Performance Systems at {203.245.5000} and delete and destroy the original message and all copies.

Received on Thu Dec 01 2011 - 18:02:13 CST

Original text of this message