The problem was:
I’m parsing an XML document which validates, but when I try to parse it using NSXMLParser, I get an error 73 (NSXMLParserGTRequiredError) before the didEndElement method gets called on the last tag. There are some non-ASCII characters (degree symbols, specifically) which, if I replace with ASCII text (‘deg’, specifically), the parse goes through w/o error. The XML comes from an external source, so I can’t just change it; and even so, I’d like to know why this is causing a problem (and even better, how to address it!).
Here’s an example of the problematic XML:
<?xml version='1.0'?>
<xml-status>
<module path='P' title='T'>
<reading status='100' path='temp' title='Temp' units='°'>98.6</reading>
</module>
</xml-status>
I found that I could add a > to the end, and it would parse. Then looked at how I was PASSING the data to the parser, and saw that I was converting the string to an array of chars, but computing its length from the original string, hence the discrepancy in lengths.