Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top