resolve_xml_special_chars: don't reinvent bsearch()