Is it possible to display Text file content with it's formating in internet browser?
I was using this code and the file was fairly readable and formated
<cffile
action = "read"
file ="#qry_doc_location.DOCUME
NT_LOCATIO
N#"
variable = "Message">
<cfset newMess = Replace(Message, chr(10),'<br />', "ALL")>
It was all good untill we had to display XML file. I could not display XML tags. Even the EDI was fairly formated with the above code.
Then I made a change by comenting out the cfset above and adding the line below.
<cfoutput>#HTMLCodeFormat(
Message)#<
/cfoutput>
This did wonders for me and XML looked great and so did EDI. EDI looked even better.
But now simple formated text file looks like a paragraph. I cannot define what type of file it is because usually a DOT dat (.dat) file and it can have XML, EDI or Text data.
I tried CF content but no help. XML looks good but then I dont have the look and feel of a website. and Text still looks like a paragharph all Tabs and stuff is gone.
Any ideas or workarounds?
Start Free Trial