Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #11 from Thomazr/master

Return nil if no children are found with childrenNamed
  • Loading branch information...
commit cd97da6990f4d9d93c2dc1b8b6a7e1b0eb50d85a 2 parents 9bd1119 + 77b2230
Nick Farina authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 SMXMLDocument.m
6 SMXMLDocument.m
@@ -114,7 +114,11 @@ - (NSArray *)childrenNamed:(NSString *)nodeName {
114 114 for (SMXMLElement *child in children)
115 115 if ([child.name isEqual:nodeName])
116 116 [array addObject:child];
117   - return [[array copy] autorelease];
  117 +
  118 + if([array count] > 0)
  119 + return [[array copy] autorelease];
  120 + else
  121 + return nil;
118 122 }
119 123
120 124 - (SMXMLElement *)childWithAttribute:(NSString *)attributeName value:(NSString *)attributeValue {

0 comments on commit cd97da6

Please sign in to comment.
Something went wrong with that request. Please try again.