Closed ids1024 closed 7 years ago
Hi, You either need to declare the entity within the xml file, point to an external DTD (this file points to http://www.perseus.tufts.edu/DTD/1.0/PersDict.dtd which itself refers to other DTDs) or convert to Unicode -- which is what we are doing with other texts as documented here: https://github.com/PerseusDL/tei-conversion-tools/wiki/HTML-Entities The above link also discusses DTDs. For this particular entity, the dagger is U+2020
Thanks for your help. Apparently network access is disabled in lxml by default (which is sensible enough, though not very prominent in the documentation). Creating a parser with no_network=False
makes it retrieve the needed DTD files and parse without error.
Entities are an aspect of XML I am not very familiar with, so I may be doing something wrong.
Anyway, when I try to run
lxml.etree.parse("lat.ls.perseus-eng1.xml")
in Python to parse the XML file for Lewis and Short, I get this error: