Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Re: Tiger bug i...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 14 Topic 3726 of 3882
Post > Topic >>

Re: Tiger bug in NSXMLParser?

by Lorenzopt <lorenzo@[EMAIL PROTECTED] > Apr 30, 2008 at 10:14 AM

David Phillip Oster wrote:
> In article 
> <lazloman-8633C4.20184029042008@[EMAIL PROTECTED]
>,
>  Can I Get a Word In <lazloman@[EMAIL PROTECTED]
> wrote:
> 
>> tidy re****ted about 300 errors. That gave me the idea to try 
>> NSXMLDo***ent, since it has the tidyXML option. This actually works. 
>> Here's the code:
>>
>>
>>    NSXMLDo***ent* theDoc = [[[NSXMLDo***ent alloc] 
>> initWithContentsOfURL:[NSURL URLWithString:urlString] 
>> options:NSXMLDo***entTidyXML error:&err] autorelease];
>>    NSData* xmlData = [theDoc XMLData];
>>    NSXMLParser* parser = [[[NSXMLParser alloc] initWithData:xmlData] 
>> autorelease];
>>    [parser setDelegate:self];
>>    [parser parse];   
>>
>> I'm happy again.
> 
> I'm not. XML is supposed to be an all-or-nothing deal. If "tidy" says 
> there are errors, then a valid XML parser shouldn't parse it. A valid 
> parser SHOULD return an error in this case.
> 
> Oh well, maybe NSXMLDo***ent is in some weird HTML compatibility mode.

Isn't that what the NSXMLDo***entTidyXML option is for? Cleaning up bad 
XML? Leopard's NSXMLParser must be doing something similar since it 
parses the XML just fine, whereas Tiger's implementation of NSXMLParser 
may be more standard fails accordingly. I suppose there is always the 
possibility that Leopard could get the parsing wrong in more complex 
XML, possibly leading to more problems, but I appreciate the extra 
effort in Leopard and wish it had been passed down to Tiger. It would 
have saved me some time.
 




 14 Posts in Topic:
Tiger bug in NSXMLParser?
Can I Get a Word In <l  2008-04-28 20:37:10 
Re: Tiger bug in NSXMLParser?
David Phillip Oster <o  2008-04-28 22:07:55 
Re: Tiger bug in NSXMLParser?
Lorenzopt <lorenzo@[EM  2008-04-29 12:20:54 
Re: Tiger bug in NSXMLParser?
Can I Get a Word In <l  2008-04-29 20:18:40 
Re: Tiger bug in NSXMLParser?
David Phillip Oster <o  2008-04-29 20:02:39 
Re: Tiger bug in NSXMLParser?
Tom Harrington <tph@[E  2008-04-30 09:22:04 
Re: Tiger bug in NSXMLParser?
Lorenzopt <lorenzo@[EM  2008-04-30 11:20:49 
Re: Tiger bug in NSXMLParser?
Tom Harrington <tph@[E  2008-04-30 12:57:32 
Re: Tiger bug in NSXMLParser?
Lorenzopt <lorenzo@[EM  2008-05-01 10:25:17 
Re: Tiger bug in NSXMLParser?
David Phillip Oster <o  2008-05-01 19:25:01 
Re: Tiger bug in NSXMLParser?
Lorenzopt <lorenzo@[EM  2008-04-30 10:14:39 
Re: Tiger bug in NSXMLParser?
Sherman Pendley <spamt  2008-05-02 00:49:43 
Re: Tiger bug in NSXMLParser?
Tom Harrington <tph@[E  2008-04-29 13:53:10 
Re: Tiger bug in NSXMLParser?
Can I Get a Word In <l  2008-04-29 20:16:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:25:46 CST 2008.