Fixed gcc warnings and added some rationale around yesterday's fix

pull/34/head
Ludovic Marcotte 2014-04-10 09:40:25 -04:00
parent f370ac114a
commit e66ceaad07
1 changed files with 6 additions and 2 deletions

View File

@ -119,9 +119,13 @@ static NSArray *asElementArray = nil;
tag = [element tagName];
count = [(NSArray *)[element childNodes] count];
if ([element isTextNode])
// We check if the node is a text one or if all its
// children are text nodes. This is important to avoid side-effects
// in SOPE where "foo & bar" would result into 3 childnodes instead
// of just one.
if ([(id)element isTextNode])
{
value = [element textValue];
value = [(id)element textValue];
}
// Handle inner data - see above for samples
else