Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> XML -- in dire need of assistance

XML -- in dire need of assistance

From: Sam Baum <sjb_at_comcast.net>
Date: Wed, 16 Jan 2002 23:14:47 GMT
Message-ID: <HPn18.78343$fo.28489416@news1.rdc1.md.home.com>


I'm using the DBMS_XMLQuery PL/SQL functions to produce an XML document from my relational tables, using an object view. As far as I can tell, everything is working as advertised. However, I have one problem that I just can't resolve and any insight would be most appreciated.

The output of the XML document looks like this:

<Person>

    <Name>Bob</Name>
    <Address>

        <Address_item>

<Street>123 Mystreet</Street>
<City>My City</City>
</Address_item> <Address_item>
<Street>456 Mystreet</Street>
<City>My City</City>
</Address_item>

    </Address>
</Person>

The problem is the DTD requires me to repeat the Address element and drop the Address_item element. The correct output needs to look like this:

<Person>

    <Name>Bob</Name>

        <Address>

<Street>123 Mystreet</Street>
<City>My City</City>
</Address> <Address>
<Street>456 Mystreet</Street>
<City>My City</City>
</Address>

</Person>

I am at a complete loss. Does anyone know who to get Oracle to do this?

Thanks in advance for your help.

Sam Baum Received on Wed Jan 16 2002 - 17:14:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US