Getting XML data into an xml report
569875Mar 29 2007 — edited Mar 29 2007What a nightmare this has been... Here is the situation I'm in:
I want to generate an XML report from my really simple table (just a date field and a clob with text in it)....
So, anyway if you just try to use the clob field it displays binary data in your xml...
My next step was to modify my query to do things like:
to_char(substr(mytable.textfield),1,3999))p1, etc...
this made varchar fields which made ok xml, however,
my user would like each line in the textfield to be tagged so the xml would loook more like:
<textfield>
<line>xxxxxx</line>
<line>ssssss</line>
...
</textfield>
So originally I figured I'd just write a procedure inside reports to do this... forget that.. reports doesn't know how to use clobs... So I tried a stored proc that I'd call from reports, and wrong again. It still didn't work.
Finally, I broke down and made another clob in my table called xmltext, and used my stored proc when I insert the data, to convert each line to xml like the above.
Now a new problem, when I pull the new xmltext clob into reports it converts the < and > with < and > !!!!! So I don't have my XML anymore!
Can anyone help me with this, its just flippin rediculous and an absolutely retarded way to try to create xml. I'm limited by my schedule from using another tool (unless you know a super simple one that easily and I mean really easily integrates with Oracle forms). I may have to tell my customer I can't do this, and have to give him a pdf report instead which makes his data undiscoverable... :(
Please let me know ASAP if you've dealt with this, and how you handled it.
-Scott