Wow thanks for digging this deep to find this problem! That is awesome.
And thanks also for the suggestions, though writing a new XML parsing tool seems a little much (if not a little bit daunting too:), and not knowing what the actual return will be makes me wonder if it's worth it in this case.
Now I wonder if this exact issue has not been encountered in other XML applications, and if so, how it was improved.