Re: NSXMLParser and CDATA sections
Re: NSXMLParser and CDATA sections
- Subject: Re: NSXMLParser and CDATA sections
- From: Kevin Ballard <email@hidden>
- Date: Tue, 28 Sep 2004 19:45:18 -0400
I've never used NSXMLParser, but does
- (void)parser:(NSXMLParser *)parser
foundProcessingInstructionWithTarget:(NSString *)target data:(NSString
*)data
trigger on the initial <?xml?> element? If so, you could probably
extract the encoding there.
On Sep 28, 2004, at 4:26 PM, Jim Correia wrote:
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?
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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