Parse the given HTML/XHTML and converts it to an XML object. Similar to xmlParse, but this function is very forgiving

htmlParse(html [, caseSensitive]) → returns xml

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Argument Reference

html string

caseSensitive boolean

Links more information about htmlParse

Sample code invoking the htmlParse function

Convert the HTML to Xml object.It supported in Lucee

HtmlContent = "Hello <body><p>world</p></body>";
writeoutput(htmlParse('<html><body><p>This is example text</p></body></html>'));

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub