若要解析这种格式; (即两个相同的标签 restel)
<author>
<restel>2147483647</restel>
<restel>7876544</restel>
</author>
可以这样:
TBXMLElement *elementtel = [TBXMLchildElementNamed:@"restel"parentElement:tbxmlElement];
while (elementtel) {
// self.chProrestel = [TBXML textForElement:[TBXML childElementNamed:@"restel" parentElement:tbxmlElement]];
self.chProrestel = [TBXMLtextForElement:elementtel]; //注意:这个地方一定不要写成上边那种的(真是想不通,上边的为啥不行)
[self.chProrestelarrayaddObject:self.chProrestel];
elementtel = [TBXML nextSiblingNamed:@"restel" searchFromElement:elementtel];
}