Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: create XML from cursor
Frank Dietrich wrote:
> Hi,
>
> I'm looking for a simple way to produce an valid XML file (with external
> DTD) from a table.
>
> A function like: CreateXMLfile(tablename, dtd_filename, xml_filename);
>
> Or is the only way
>
> select XMLELEMENT( "elements",
> XMLAGG ( XMLELEMENT ( "child_1",
> XMLELEMENT ( "child_2",
> [and so on ...]
>
> And check by my self that the XML will be valid to the DTD?
>
> regards
> Frank
I have been using the XML capabilities recently, and I have not yet found a way to validate an XML type using a DTD. I believe you can validate against an XML Schema document though (these are the successor to DTD's and are quite a bit more powerful). I am not sure if you can put the schema in a file, or if it has to be on a URL. The XML Developers Guide tells you how to do this (in the section it describes the XMLTYPE api). Received on Sun Sep 11 2005 - 08:48:11 CDT
![]() |
![]() |