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.

htmlParse 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>'));

Fork me on GitHub