Skip to content

Instantly share code, notes, and snippets.

@xtender
Created May 5, 2020 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xtender/ff82c2909eefd481a04fac3657dce56a to your computer and use it in GitHub Desktop.
Save xtender/ff82c2909eefd481a04fac3657dce56a to your computer and use it in GitHub Desktop.
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