Focal Point
[CLOSED for now] Displaying the contents of a CLOB field

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9907068526

November 04, 2012, 05:17 AM
Danny-SRL
[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.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
November 04, 2012, 01:16 PM
Danny-SRL
quote:
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.

See the ASP implementation: http://www.w3schools.com/asp/prop_contenttype.asp

See this WebFOCUS documentation: http://www.csueastbay.edu/FOCU...79.htm#d10sec1094378

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
November 07, 2012, 02:17 PM
Danny-SRL
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.


Alan.
WF 7.705/8.007
November 08, 2012, 02:47 PM
Mighty Max
Does this post help at all? [SOLVED] Display XML file stored in SQL Table


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
November 10, 2012, 02:13 PM
Danny-SRL
Alan & Max,

Thanks. I'll give it a try.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF