<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">HTML is not XML</div><div class=""><br class=""></div><div class="">You can use the HTML parser (and sanitizer) in zotonic_stdlib</div><div class=""><br class=""></div><div class=""><a href="https://github.com/zotonic/z_stdlib/tree/master/src" class="">https://github.com/zotonic/z_stdlib/tree/master/src</a></div><div class=""><br class=""></div><div class="">Check z_html.erl en z_html_parse.erl</div><div class=""><br class=""></div><div class="">The parser is an adapted version of the parser in mochiweb.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Marc</div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 22 Apr 2020, at 11:06, L yrosgi <<a href="mailto:absente@live.cn" class="">absente@live.cn</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">I checked the error report and found that it can not parse the text which contains escape character such like "&nbsp". After googling for a while, I still can not find any solution by using xmerl lib. Is that means xmerl can not do this kind of parsing, or there is other built-in solution to parse html?</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">Thanks for any replys.<br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">below is the error messages:</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><span class="">=ERROR REPORT==== 22-Apr-2020::12:16:45.003000 ===<br class=""></span><div class="">2868- fatal: {unknown_entity_ref,nbsp}<br class=""></div><div class=""><br class=""></div><div class="">=ERROR REPORT==== 22-Apr-2020::12:16:45.003000 ===<br class=""></div><div class="">2778- fatal: error_scanning_entity_ref<br class=""></div><div class=""><br class=""></div><div class="">escript: exception exit: {fatal,<br class=""></div><div class="">                    {error_scanning_entity_ref,<br class=""></div><div class="">                        {file,file_name_unknown},<br class=""></div><div class="">                        {line,126},<br class=""></div><div class="">                        {col,60}}}<br class=""></div><div class="">  in function  xmerl_scan:fatal/2 (xmerl_scan.erl, line 4124)<br class=""></div><div class="">  in call from xmerl_scan:scan_content/11 (xmerl_scan.erl, line 2579)<br class=""></div><div class="">  in call from xmerl_scan:scan_element/12 (xmerl_scan.erl, line 2133)<br class=""></div><div class="">  in call from xmerl_scan:scan_content/11 (xmerl_scan.erl, line 2605)<br class=""></div><div class="">  in call from xmerl_scan:scan_element/12 (xmerl_scan.erl, line 2133)<br class=""></div><div class="">  in call from xmerl_scan:scan_content/11 (xmerl_scan.erl, line 2605)<br class=""></div><div class="">  in call from xmerl_scan:scan_element/12 (xmerl_scan.erl, line 2133)<br class=""></div><div class="">  in call from xmerl_scan:scan_content/11 (xmerl_scan.erl, line 2605)</div></div></div></blockquote></div><br class=""></body></html>