I’m now using NSXMLParser to parse html, but when meet “br” tag in html, it will throw an error for mismatch and stop to parse, because typically “/br” tag will not appear in html. So I want to ignore this mismatch error to continue parse, how to deal with it?
Share
Not the best solution, but you might consider to do some regex correction before parsing, such as:
$input =~ s/<br>/<br \/>/ig;