Re: CFXMLNodeGetString() chokes on "&", "<" or ">"
Re: CFXMLNodeGetString() chokes on "&", "<" or ">"
- Subject: Re: CFXMLNodeGetString() chokes on "&", "<" or ">"
- From: Jerry Krinock <email@hidden>
- Date: Sat, 11 Sep 2004 21:40:44 -0700
on 04/09/11 20:54, Sherm Pendley at email@hidden wrote:
> The kCFXMLParserReplacePhysicalEntities and possibly the
> kCFXMLParserResolveExternalEntities options look like they might be
> useful for expanding entities into strings for you, but they're listed
> in the docs as unsupported.
OK, I just tried those options, and CodeWarrior recognizes them OK, but they
don't help the parsing, so probably they are indeed unsupported.
So, it looks like I have two options (1) parse for additional strings as in
the code posted by Izidor or (2) rewrite much of my code using the advice of
Ken, to dump CoreFoundation and use Cocoa functions instead. He showed me
how to convert the NSData to an NSDictionary using
[NSPropertListSerialization propertyListFromData:], create an NSEnumerator
from the NSDictionary, and then I can sort each "Children" object using
[NSMutableArray sortUsingSelector:<myHelperMethod>].
I suspect that the quick-fix option (1) might cause a big performance hit,
but since I have the luxury of doing this for fun, I'm going to try both
options and benchmark them. I'll let you all know the results in a few
weeks/months.
> For more (lots more) about XML entities and entity expansion, see the
> section of the <http://w3c.org> site concerning XML, or any good book
> about it.
Yeah, I should have read that 6 months ago. Reverse-engineering is fun, but
limited.
Thank you all for your help.
_______________________________________________
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