Forum Moderators: open
I tend to write "optimized" XML (no line breaks anywhere), and that always works/validates. I run it through a PHP "cleaner" that strips out comments, extra whitespace and line breaks.
It may break "well-formed-ness" rules and result in unexpected behavior. I know it's OK to break up XML elements along lines of their attributes, etc. You may want to consider controlling the way your file breaks up XML elements, and not just wait for the 256th character.
Sort of like how a word processor adds page breaks before paragraphs, etc.