Well, you’ll have much better things to do than this, but it may be worth it sometime. I tried finding ways to pre-process my files, but came up blank. So I have hacked an answer. This is the kind of thing I have to deal with:
Not in the
universe. This Cat is dead because that Cat killed me. Me! In cold blood! After everything I did for her.
The actual text is naked within the element, which may or may not have other named attributes. Clearly, you have to keep all whitespace.
What I’ve hacked is to note the input-pointer early in XmlDocument::readChildElements, and then wind back in the case where it has been identified as a simple text-block. This shouldn’t break anything else, and - since it only applies to raw text and is technically correct, I doubt that it will upset any existing code.
It solves my problem. But it is hacky. If it’s any use, I’ll send or post the changes.