inbinder inbinder - 6 months ago 10
Python Question

data types for XML parsing

Are dictionaries more appropriate for storing parsed XML data or does this come down to use case and therefore more subjective?

Below is a small snippet of the data that I am parsing

<Issuer>fotokem</Issuer>
<Creator>ClipsterDCI 4.5.0.24</Creator>
<Id>urn:uuid:6ab4b76e-0e26-4d73-8d01-6f08c96feb71</Id>
<Path>MINI-NOT-NORM-USA_ADV_F_EN-XX_51_2K_SPO_20121127_FKI_01.mxf</Path>

Answer

The most Pythonic way to parse XML is lxml.

Comments