> When it comes to storing structured data, the reason I > recommend XML (or any other format with named closing > structures) is that complex data often lacks the > redundancy in content that clues us to indentation levels > being incorrect and thus nesting being wrong. If you have > nested levels of items with arbitrary property lists, how > do you tell if a given key-value pair belongs to a parent > structure other than solely by the indent level?
In the case of my own custom structure, I restrict the indents to 4 spaces only. My understanding was that the issue is the mixed whitespace as you mention in your post.
Based on what you are suggesting and my own thought about this I am wondering if I should add an attribute ending character and one for the start of an element.
The reason I wished to avoid this in the first place is that now I have no need for escaping. Obviously, if I want to support attributes with newlines, I'd need to change that anyway. Escaping isn't a big deal really, I've added it to parsers before.