Table records to Xml in PL/SQL
<p>We currently use Oracle/PL/SQL and Oracle Forms WEB as User Interface. </p>

<p>The thing is that we decided to migrate the UI from Forms to another UI (probably HTML5/ Angular...). 
Our system architecture is layered in a way that the batch code will remain untouched and all we have to do is to access the GUI Façade from the new technology (still to be chosen). The problem is: All the data this GUI Façade provides (curretly to Oracle Forms) is structured in collections like: </p>

<pre><code>TYPE tp_rc_cod IS RECORD( 
-- Return code 
cd_return NUMBER(2), 
-- Name 
cd_name some_table.name%TYPE 
); 
TYPE tp_table_rc_cod IS TABLE OF tp_rc_cod INDEX BY PLS_INTEGER; 
</code></pre>

<p>So, Is there any way to quicky convert the returns of our current GUI Façade from table records to XML or JSON? 
We thought about building a Wrapper in the middle of the new UI and current GUI Façade, however the system is not small, so it could became hard to build and maybe have performance issues. </p>

<p>I already know that It is not feasible for Oracle JDBC drivers to support calling arguments or return values of the PL/SQL RECORD, BOOLEAN, or table with non-scalar element types. However, Oracle JDBC drivers support PL/SQL index-by table of scalar element types. If this happens, How can Oracle Forms, for instance, do it? Does it build a Wrapper itself? </p>

<p>Any suggestions? </p>