I'd suggest adding it as an argument to the functions that call etree.parse, and then passing it through to that call:
|
def parseUri(stream, uri=None): |
|
"""Read an XML document from a URI, and return a :mod:`lxml.etree` |
|
document.""" |
|
return etree.parse(stream, parser=_get_xmlparser(), base_url=uri) |
|
_loaded_schemas[uri] = etree.XMLSchema( |
|
etree.parse(uri, parser=_get_xmlparser(), base_url=base_uri) |
|
) |
It looks like they aren't called by other functions themselves, so I think this should be safe? Could be worth checking if parse is called elsewhere and if etree.fromstring has the same problem.
Originally posted by @blms in #20 (comment)
I'd suggest adding it as an argument to the functions that call
etree.parse, and then passing it through to that call:neuxml/neuxml/xmlmap/core.py
Lines 54 to 57 in 992ff81
neuxml/neuxml/xmlmap/core.py
Lines 86 to 88 in 992ff81
It looks like they aren't called by other functions themselves, so I think this should be safe? Could be worth checking if
parseis called elsewhere and ifetree.fromstringhas the same problem.Originally posted by @blms in #20 (comment)