Strange, the character data being returned is waaaay too large for the object in question. The object is a base64-encoded JPEG in this case and is about 50k of data, yet the Char subroutine is fired way more times than there is lines of data in the XML for that object. I'll keep poking around.
OK, I've done that for the element that's being problematic. It seems to just keep firing the character data sub over and over, and the expected and original strings always match (and always appear to be Base64-encoded data). The data is PCDATA, not CDATA. Should I try using CDATA?