NSXMLNode children by name

I needed to parse some xml recently and found a neat little category to add to the NSXMLNode class. Basically this allows you to find a node by name.

@implementation NSXMLNode (utils)

- (NSXMLNode *)childNamed:(NSString *)strName {
NSEnumerator *e = [[self children] objectEnumerator];

NSXMLNode *node;
while (node = [e nextObject])
if ([[node name] isEqualToString:strName])
return node;
   
return nil;
}

- (NSArray *)childrenAsStrings {
NSMutableArray *ret = [[NSMutableArray arrayWithCapacity:
[[self children] count]] retain];
NSEnumerator *e = [[self children] objectEnumerator];
NSXMLNode *node;
while (node = [e nextObject])
[ret addObject:[node stringValue]];

return [ret autorelease];
}

@end

Don't forget to add the interface to go with it. Than you can run a simple:
[someXMLnode childNamed:@"anotherNode"];