read xml-attributes from xsd file for sumolib.parsing
Does this actually help with generalizing the sumolib.xml.parse() family function?
This was part of a discussion earlier in the mailing list about adding overlapDensity in the schema file.
Currently, this function allows me to read xml files like below without worrying about the order of the attributes:
for row in sumolib.xml.parse_fast_nested(input_xmlfile, 'interval', ['begin'], 'edge', sumolib.xml.attributes_from_xsd(f'{$SUMO_HOME}/data/xsd/types/meandata.xsd', 'edgeLaneDataType'), optional=True):
Thanks for this one! Making parsing easier is definitely a big plus. This code however relies on the assumption that the order in the xsd is identical to the output order. We can try to keep an eye on this but currently there is no check enforcing it. Furthermore it is not clear to me why the code cares so much about namespaces since we do not use them.