Skip to content

Instantly share code, notes, and snippets.

@xtender

xtender/fixed.sql

Created May 5, 2020
Embed
What would you like to do?
html-xml compatibility
create or replace function clob_to_xml return xmltype
as
l_clob clob;
l_xml xmltype;
begin
l_clob :='<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></META>
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>400 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade="1" size="1px" />
Bad request.
We can not connect to the server for this app or website at this time.
There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all" />
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all" />
<HR noshade="1" size="1px" />
<PRE>
Generated by cloudfront (CloudFront)
Request ID: OuFlfxj915qL9MRuJXsVcgVg990EyHMuVCo8VfGj3Qfc_MV1ou79cQ==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>';
l_xml := xmltype(l_clob);
return l_xml;
end;
/
declare
r_xml xmltype;
begin
r_xml := clob_to_xml;
end;
/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment