ratal / mdfreader

Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Other
169 stars 74 forks source link

mdf_info['HD']['Comment'] is incomplete for MDF 4 files #114

Closed ginseil closed 6 years ago

ginseil commented 6 years ago

Hi,

I am missing some data in mdf['HD']['Comment']: image

The Comment is parsed and loaded for this XML content: `

ASAM MDF 4.0 Example file created by ETAS. Contents: 2 simple channel groups containing ints and floats in little endian format. PC timer Example ASAM Example Files ETAS GmbH Tobias Langner

`

As can be seen the XML has content for TX and time_source but TX is parsed to None and time_source does not exist at all. Only the properties in common_properties are read.

danielhrisca commented 6 years ago

It is probably linked to the issue #99

Using find instead of xpath works better: https://github.com/danielhrisca/asammdf/blob/master/asammdf/mdf4.py#L3395

ratal commented 6 years ago

I switched from etree/xpath to objectify, should be better working. small performance downside but as it was not working before, maybe not relevant. Please check.

ginseil commented 6 years ago

Works like a charm, thanks!