Closed the-infinity closed 10 months ago
Testing with https://data.mfdz.de/DATEXII_Parkdaten_statisch_Stuttgart/body.xml results in
% python test-push-converter.py stuttgart ./temp/stuttgart-statisch.xml
Traceback (most recent call last):
File "/.../ParkAPI2-sources/test-push-converter.py", line 121, in <module>
main()
File "/.../ParkAPI2-sources/test-push-converter.py", line 67, in main
root_element = etree.fromstring(xml_file.read(), parser=etree.XMLParser(resolve_entities=False)) # noqa: S320
File "src/lxml/etree.pyx", line 3257, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1911, in lxml.etree._parseMemoryDocument
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
That's interesting: the data which is dumped at IPL does not have the <?xml version='1.0' encoding='UTF-8'?>
. Do you add the delaration at mfdz, or is our dump wrong?
Seems like the dump is incomplete, mfdz republishes as is provided by Stuttgart (or better: MDM)
Ouch. Changed the loading mechanism of the test script, so "the real" Stuttgart is supported.
This adds Stuttgart V3 = push support. It also adds a small library which is capable of doing nice converts from XML to JSON in order to support XML imports.