reklis/SVGKit — comment on commit add8144bcdf7da5d6378358815db0247dbdf39c8
File:  line 0
By adamgit:

This is what I've gone with in the end. The SVGDocument has a bonus property, which is an ARRAY of the anonymous groups, alongside the DICTIONARY of the groups with id's.

That way, you can easily tell which is which, and find them at runtime. Committed to parser-upgrade branch here, if you want to have a look: https://github.com/adamgit/SVGKit/commit/3dd5af3ed28cbbd5812ff097d59612425c5050d7

/*!
SVG Spec attaches special meaning to the "g" tag - and applications
need to be able to pull-out the "g"-tagged items later on
*/
if( [childElement.localName isEqualToString:@"g"] )
{
if( childElement.identifier == nil )
{
[_anonymousGraphicsGroups addObject:childElement];
}
else
[_graphicsGroups setValue:childElement forKey:childElement.identifier];
}