• 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
Re: Event-Driven XML Parsing and Entity References
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Event-Driven XML Parsing and Entity References


  • Subject: Re: Event-Driven XML Parsing and Entity References
  • From: Martijn <email@hidden>
  • Date: Sun, 27 Jul 2008 22:05:09 +0200

Hey, i am not sure but i have the feeling that the title should be "planes,
trains, &amp; automobiles"
so with an extra semicolon behind the &amp.



2008/7/27 Carter R. Harrison <email@hidden>

> There's been some discussion on this topic previously, but I haven't been
> able to find the solution that I'm looking for.  I'm using the event-driven
> XML parser (CFXMLParser).  Apparently it does not support the replacement of
> entity references (&amp, &lt, &gt, etc..).
> So assume I'm trying to parse the following XML tag:
>
> <title>Planes, Trains, &amp Automobiles</title>
>
> When the parser enters the <title> node, it calls the createStructure
> callback function three times.  Each time it has the following data within
> the node that is passed in:
>
> Call #1: "Planes, Trains, "
> Call #2: "&amp"
> Call #3: " Automobiles"
>
> A similar thing happens in the addChild callback function.
>
> I understand that I need to do manual replacement of the &amp with a "&" in
> this case, but I still don't understand how I'm supposed to maintain the
> state in between the three calls to createStructure and addChild so that I
> can successfully concatenate all three text segments together to form the
> original string (which is what I want to store).  I hope this makes sense -
> it's terribly frustrating.
>
> As always, thanks in advance.
> _______________________________________________
>
> 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
>
_______________________________________________

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

References: 
 >Event-Driven XML Parsing and Entity References (From: "Carter R. Harrison" <email@hidden>)

  • Prev by Date: Re: IB view transitions, CA, NSWindow animation
  • Next by Date: Re: Unable to detect a NSRightMouseDown event using a three-button mouse?
  • Previous by thread: Event-Driven XML Parsing and Entity References
  • Next by thread: Re: Event-Driven XML Parsing and Entity References
  • Index(es):
    • Date
    • Thread