HtmlParse()

parse the given HTML (not only XHTML) as XML Object, work similar to XmlParse(), but this function is very forgiving with the syntax.

You can then use XmlSearch() to query to xml object

HtmlParse( html=string, caseSensitive=boolean );

Returns: Xml

Argument Description
html
string, required

A string or a variable that contains one, with HTML to be parsed

Alias: string, text

caseSensitive
boolean, optional

Maintains the case of document elements and attributes

Examples

content = "HI <body><p>Hello</p></body> !!!";
writeDump(htmlParse(content));
writeoutput(htmlParse('<html><body>aaa<br>bbb</body></html>'));

See also