In xml, can I assume that character data is always located between 1) a start tag and a start tag, 2) a start tag and it's corresponding end tag, or 3) an end tag and an end tag?
Code:
<foo>case1
<bar>case2</bar>
case3
</foo>
I ask because I'm trying to learn a streaming xml parser (expat) and often, contigious character data blocks are broken up into more than one calls to the chardata handler, so I need a way of delimiting it reliably to know when it's over.