Skip to content

CData Not parsing #8

Description

@Prarik

First of all thanks for creating this great parser that helped me a lot.

Now i know that CData means you have to ignore while parsing, but in case i need to parse it then how can i do it?

I found one method in NSXMLParserDelegate and i implemented it as below. The problem is how to place the string parsed exactly where it belongs.

-(void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock
{
NSString *someString = [[NSString alloc] initWithData:CDATABlock encoding:NSUTF8StringEncoding];
// Build the text value
[self.textInProgress appendString:someString];
NSLog(@"-------CData String %@",someString);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions