Chris Tsou
Chris Tsou
Hi @twoolie I thought I had replied to this 🤦, sorry about that. The parser keeps a copy of the original namespace mapping. ``` obj = xml_parser.from_path(xml_fixture, Definitions) result =...
Makes sense, sure give it a try.
Thanks for reporting @twoolie https://xsdata.readthedocs.io/en/latest/data_binding/xml_parsing/#capture-namespace-prefixes
It's not impossible, I don't have an example, but you would have to roll out your own xml handler to ignore all other elements
Or use etree manually, to pick the elements you want and then pass them to xsdata XmlParser Something like this ``` tree = lxml.etree.parse("/tmp/Flix_Line_x400.xml") for element in tree.iterfind(".//{http://www.netex.org.uk/netex}ServiceJourney"): service_journey =...
You gave to do it manually, or create a custom schema
There is this ticket here https://github.com/tefra/xsdata/issues/763 It's not hard to carry it, but there are too many possibilities and I am not sure what to do to cover all of...
I will gladly accept a contribution about a hook or something you can you use to plugin your custom logic
We have the [PycodeSerializer](https://xsdata.readthedocs.io/en/latest/examples/pycode-serializer.html), maybe we could do something similar to produce an etree object
Give it a look https://xsdata.readthedocs.io/en/latest/data_binding/tree_serializing/