• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSXMLParser and CDATA sections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSXMLParser and CDATA sections


  • Subject: NSXMLParser and CDATA sections
  • From: Jim Correia <email@hidden>
  • Date: Tue, 28 Sep 2004 16:26:57 -0400

I am trying to parse an XML file with NSXMLParser.

The file in question has CDATA sections. When I encounter on the delegate is called:

- (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock
{
	NSLog(@"CDATA: %@", CDATABlock);
}

The problem is that the CDATABlock is provided as an NSData blob. But CDATA is just characters, in the XML document's encoding.

Is there a way (without resulting to ad hoc methods) of getting the document's encoding so I get out the string data?

Jim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSXMLParser and CDATA sections
      • From: Kevin Ballard <email@hidden>
  • Prev by Date: force entire window redraw?
  • Next by Date: Re: Localizing a helper app
  • Previous by thread: force entire window redraw?
  • Next by thread: Re: NSXMLParser and CDATA sections
  • Index(es):
    • Date
    • Thread