Apple Health export file error: Errors in DTD definitions

While posted already Apple Health file error: Bad xml - Apple Community, it's now 2-1/2 months later and I'm still running into the same issue. Based on an Apple Health export performed yesterday, from an iPhone 12 mini running iOS 16.1.2.


xmllint on OSX: Ventura 13.0.1 (22A400) gives the following:


$ xmllint export.xml
export.xml:156: parser error : ATTLIST: no name for Attribute
<!ELEMENT RightEye EMPTY>
^
export.xml.fromAppleWithMistakes:206: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration

  device           CDATA #IMPLIED
  ^
export.xml.fromAppleWithMistakes:206: parser error : DOCTYPE improperly terminated
  device           CDATA #IMPLIED
  ^
export.xml.fromAppleWithMistakes:206: parser error : Start tag expected, '<' not found
  device           CDATA #IMPLIED
  ^
$


Having to manually patch the export file's DTD definitions is not optimal (this a BIG file).


However, the errors should be trivially corrected (are they auto-generated?) and should be patched immediately (with actual testing!)

iPhone 12 mini

Posted on Dec 5, 2022 3:42 PM

Reply

Similar questions

6 replies

Dec 6, 2022 8:09 AM in response to pdde_borocz

pdde_borocz wrote:

While posted already Apple Health file error: Bad xml - Apple Community, it's now 2-1/2 months later and I'm still running into the same issue.

Anyone can post questions on this forum. Apple doesn't read them. You have to do some real work to get Apple to notice. I recommend the bug reporter option posted by MrHoffman. If enough people do that, it might get fixed in a few months.


Until then, I recommend the fixes I posted in this thread: problem with import of XML Apple HealthKi… - Apple Community


Dec 5, 2022 4:06 PM in response to pdde_borocz

pdde_borocz wrote:
...
However, the errors should be trivially corrected (are they auto-generated?) and should be patched immediately (with actual testing!)


Apple may or may not read postings and bug reports here.


Log your feedback directly: Product Feedback - Apple


Or if you're enrolled in the Apple developer program, log it here: Bug Reporting - Apple Developer

Dec 6, 2022 10:10 AM in response to etresoft

I actually thought of going down the patch route as well but didn't relish the thought of having to clean up a diff between two 1.5GB+ export.xml files....Thanks for creating said patch file! (and yes, major league embarrassing of Apple to mess up on such old, well understood technology...heck, maybe by 2025 they'll finally decide to do it in json/yaml/toml ! ;-)

Dec 6, 2022 1:58 PM in response to pdde_borocz

pdde_borocz wrote:

major league embarrassing of Apple to mess up on such old, well understood technology...heck, maybe by 2025 they'll finally decide to do it in json/yaml/toml ! ;-)

Yes. This is doubly painful to me. I'm a big fan of XML. I can't stand those modern formats. I think they are objectively inferior. But when Apple does such a poor job of it, what do people do? Blame Apple or blame XML? Json is just as easy to screw up. It just needs 1.5 GB of RAM instead of 72 K to do it. I wonder if internally this is just someone's attempt to blame the problem on XML as an excuse to switch to something else simply because yafml is more valuable on their resume when trying to get a job at Google or Amazon.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Apple Health export file error: Errors in DTD definitions

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.