Question

Is it possible to export the data returned from an Oracle View to an XML using an XSD? If so, how do you go about doing so? I have looked through Oracle's XMLType documentation and haven't found anything that seems to fit my particular situation.

Était-ce utile?

La solution

Not sure about what exactly you need. You may either try

select xmltype(cursor(
    select *
    from your_view_vw
)) as view_data_in_xml$ from dual;

or write your view to directly construct your XML data via the XML functions

or annotate your XSD, register it in Oracle DB as XML-Schema (plus have the Oracle pre-create the object/collection types), then fill in your view's data into the pre-created object/collections, then cast it via the xmltype.createXML() constructor with your XSD's name as the schema parameter.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top