Re: NSXMLParser - howto resolve entities defined in DTD
Re: NSXMLParser - howto resolve entities defined in DTD
- Subject: Re: NSXMLParser - howto resolve entities defined in DTD
- From: Jeffrey Oleander <email@hidden>
- Date: Mon, 1 Jun 2009 13:36:21 -0700 (PDT)
> On Mon, 2009/06/01, Keary Suska <email@hidden> wrote:
> From: Keary Suska <email@hidden>
> Subject: Re: NSXMLParser - howto resolve entities defined in DTD
> To: "Cocoa-Dev (Apple)" <email@hidden>
> Date: Monday, 2009 June 1, 10:16
>> On 2009 May 31, at 4:31 PM, Dominik Pich wrote:
>> I use NSXMLParser to parse large XML files-- going
>> good BUT :)
>> I cant get the parser to resolve the external entities
>> from the DTD.
>>
>> I googled and read documentation and older mails...
>> and I did set parser.shouldResolveExternalEntities =
>> YES
> Well, the docs state: 1) "An NSXMLParser notifies its
> delegate about the items (elements, attributes, CDATA
> blocks, comments, and so on) that it encounters as it
> processes an XML document. It does not itself do
> anything with those parsed items except report them."
> and 2) in setShouldResolveExternalEntities, "Indicates
> whether the receiver reports declarations of external
> entities using the delegate method
> parser:foundExternalEntityDeclarationWithName:publicID:systemID:."
>
> I should be clear, then, that NSXMLParser does *not*
> resolve external entities in any way, only reports
> them, and explains what you see.
And I don't recall it saying anything about parsing and
otherwise examining the DTD or XML schema file except
that there were hooks for later possible development
of means to check whether the XML conforms to a DTD
or XML schema.
My reading is that it should be possible to have it
parse whatever it finds in an XML file without any
regard for whether it conforms to a DTD or XML schema.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden