While using xmlstarlet on web pages, I most of time faced entity reference error. which render it useless for extracting from web pages.
As html page are not well formed XML (is there some option to process html also ?) I convert them with
tidy -asxhtml
to XHTML, where tidy put declaration
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
then after processing it with xmlstarlet
curl http://www.xfree86.org/current/index.html | tidy -asxhtml | \
xmlstarlet sel --net -T -t -m hr -v . -
it throw always same error
-:13: parser error : Entity 'reg' not defined
<h1>Documentation for XFree86® version 4.8.0</h1>
Do anybody know how to let xmlsttarlet know the entity reference file.