• 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
NSXML and >
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSXML and >


  • Subject: NSXML and >
  • From: Keith Blount <email@hidden>
  • Date: Tue, 9 Feb 2010 12:19:32 -0800 (PST)

Hello,

I'm using the NSXML classes to write out various strings, and it seems that these classes convert "<" to "&lt;" but not ">" to "&gt;", which I find odd. For instance, consider the following code snippet:

NSXMLElement*element = [[[NSXMLElementalloc] initWithName:@"Test"stringValue:@"< & >"] autorelease];
NSLog (@"%@", element);

The output is:

<Test>&lt; &amp; ></Test>

Is this correct, or is this a bug? Or am I missing something? Do I therefore need to replace all occurrences of ">" with "&gt;" myself to generate better XML?

Many thanks and all the best,
Keith



_______________________________________________

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

  • Follow-Ups:
    • Re: NSXML and &gt;
      • From: glenn andreas <email@hidden>
  • Prev by Date: Re: iPhone: UIWebView scroll position
  • Next by Date: Re: Versioning / increasing build number
  • Previous by thread: Re: iPhone: UIWebView scroll position
  • Next by thread: Re: NSXML and &gt;
  • Index(es):
    • Date
    • Thread