Guest User

Untitled

a guest
Jul 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI
  2. qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict {
  3. [pathStack appendString:elementName];
  4. NSString *fullPath = [self upperFirst:localName];
  5. if ([fullPathStack count] == 0) {
  6. [fullPathStack addObject:fullPath];
  7. } else {
  8. [fullPathStack addObject:[[fullPathStack lastObject] stringByAppendingString: fullPath]];
  9. }
  10. [fullPath release];
  11.  
  12. contents = [[NSMutableString alloc] init];
  13. [contentsStack addObject:contents];
  14. [contents release];
  15. if ([delegatesStack count] == 0) {
  16. MCXmlParserDelegateEntry *de = [[MCXmlParserDelegateEntry alloc] init];
  17. de.prefix = @"";
  18. de.delegate = self;
  19. de.added = false;
  20. [self pushDelegate: de];
  21. [de release];
  22. } else {
  23. MCXmlParserDelegateEntry *de = [[MCXmlParserDelegateEntry alloc] initWithDelegate: currentDelegate];
  24. [self pushDelegate: de];
  25. [de release];
  26. }
  27. [self dispatchPath: @"begin" attributes: attributeDict value: @""];
  28. }
Add Comment
Please, Sign In to add comment