Health.App export creates invalid XML

Originator:brian
Number:rdar://21431305 Date Originated:2015-06-17
Status:Closed Resolved:Duplicate of 22690643
Product:iOS Product Version:8.3 (12F70)
Classification: Reproducible:Always
 
Summary:
When exporting an XML dump of health data via Health.App, some of the XML attributes have spaces in them, resulting in invalid XML. It seems specific to the Withings scale data points, but I'd expect the onus of generating valid XML would be on Health.app's jurisdiction.

Steps to Reproduce:
1. Log body fat with a Withings scale.
2. Launch Health.app
3. Health Data -> All -> Sharing/Export icon. Email to yourself.
4. Unzip the email attachment and load the XML in an XML validator.
5. attribute name without = in element

Expected Results:
There should not be spaces in attribute names. They should either be CamelCased or replaced_with_underscores.

Actual Results:
For example, records such as this:

<Record type="HKQuantityTypeIdentifierBodyFatPercentage" source="Withings" unit="%" creationDate="20150616071916-0700" startDate="20150616071820-0700" endDate="20150616071820-0700" Health Mate App Version="2.6.0" HKDeviceSerialNumber="xxxx" Withings User Identifier="xxxx" Modified Date="2015-06-16 14:19:08 +0000" Withings Link="withings-bd2://timeline/measure?userid=xxxx&amp;amp;date=xxxx&amp;amp;type=1" HKWasUserEntered="0" value="xxxx"/>

Note the attributes "Health Mate App Version" and "Withings User Identifier" and "Withings Link".

Version:
8.3 (12F70)

Notes:


Configuration:
iPhone 5s

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!