in reply to How to Truncate Corrupt Document.xml Files?
I would start by using a streaming (SAX) parser and maintaining a stack of unclosed tags. Have you tried that yet?
In Section
Seekers of Perl Wisdom
in reply to How to Truncate Corrupt Document.xml Files?