• 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
Tiger bug on NSXMLParser?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tiger bug on NSXMLParser?


  • Subject: Tiger bug on NSXMLParser?
  • From: "Lorenzo Thurman" <email@hidden>
  • Date: Mon, 28 Apr 2008 20:42:56 -0500

I'm using NSXMLParser to read an XML document from a server via
initiWithContentsOfURL. This works just fine under Leopard. I can read and
parse the data just fine, but under Tiger, I get an empty document error:
NSXMLParserErrorDomain = 4 (Empty document). There are several posts in the
archives about problems with NSXMLParser, but nothing suggesting a Tiger bug
leading to an empty document. (Actually one thread about it, but referring
to initWithData and not calling it a bug) Unless someone thinks there's
something wrong with my code, I'm going to file a bug with Apple.


Here is my code:

NSString* urlString = [str stringByAddingPercentEscapesUsingEncoding:
NSUTF8StringEncoding];

NSXMLParser* locationData = [[[XMLParser alloc] initWithContentsOfURL:[NSURL
URLWithString:urlString]]  autorelease];

[locationData setDelegate:self];

[locationData parse];

NSError* err = [locationData parseError]; <---Empty document error



str is the url as an NSString.


The documents encoding is actually Latin1, I pasted the last one I tried
here. I've tried a few encodings, but they all fail with the same error.

Any ideas?



--
"My break-dancing days are over, but there's always the funky chicken"
--The Full Monty
_______________________________________________

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: Tiger bug on NSXMLParser?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Link errors against _HIShapeContainsPoint
  • Next by Date: Re: Tiger bug on NSXMLParser?
  • Previous by thread: Re: Link errors against _HIShapeContainsPoint
  • Next by thread: Re: Tiger bug on NSXMLParser?
  • Index(es):
    • Date
    • Thread