[CLOSED for now] Displaying the contents of a CLOB field
A customer uses a CLOB field in an Oracle database to store some XML. He would like to display the XML on his screen as if coming from a notepad file: he wants to see all the tags. Any ideas?This message has been edited. Last edited by: Danny-SRL,
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
November 04, 2012, 10:03 AM
ABT
i think you'll have to replace the greater than tags with & gt ; and less thans with & lt ; to get it to display and not interpret. either that or change the http header to infer that it's a text output and not to be interpreted.
change the http header to infer that it's a text output and not to be interpreted
What would the header look like?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
November 04, 2012, 01:39 PM
ABT
quote:
Originally posted by Danny-SRL: What would the header look like?
I have experience doing this in ASP, but not in WebFOCUS, so I'm sort of shooting from the hip. Seems like switching the output to text\plain should allow it to come through as plain text.
This is a description of where I am now: I defined the CLOB with format A32000. I issue a TABLE command and PRINT my CLOB. If I understand you correctly, I should issue before the TABLE command something like
-HTMLFORM BEGIN
-* here a content-type which would say plain/text or something to that effect
-HTMLFORM END
So my question is what exactly do I put between the -HTMLFORM command?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
November 08, 2012, 05:52 AM
Alan B
The only way I know of easily getting tagged XML into the browser is to use a textarea:
TABLE FILE fn
PRINT XML
ON TABLE SAVE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<style type="text/css"> textarea { overflow: auto; border: none; width:110%; height:100%;} </style>
</head>
<body>
<textarea>
!IBI.FIL.SAVE;
</textarea>
</body>
</html>
-HTMLFORM END
The browsers tend to always want to interpret the XML no matter how you try and present it.