htmlParse

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
Required

caseSensitive boolean

Links more information about htmlParse

Examples
Sample code invoking the htmlParse function

Convert the HTML to Xml object.It supported in Lucee

HtmlContent = "Hello <body><p>world</p></body>";
writeDump(htmlParse(HtmlContent));
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