NSXLMDocument and malformed XML
NSXLMDocument and malformed XML
- Subject: NSXLMDocument and malformed XML
- From: "Chris Gregg" <email@hidden>
- Date: Thu, 25 May 2006 08:22:12 -0400
Disclaimer: I'm still a newbie with Cocoa, and I'm slowly stumbling
onto new ways to do things more simply.
I wrote a little program that reads iWeb index.xml files (after
unzipping them in their original index.xml.gz), and I originally wrote
a minimalistic XML parser to get at the important bits of code I was
looking for, from the NSString I loaded from the file.
But then I stumbled onto XMLDocument, which, I thought, would make
my life much easier by loading the XML for me. Excellent. The
problem is that the XML in some iWeb index.xml files is malformed, and
I'm getting the following error back from initWithContentsOfURL:
options: error:
"Line 2: Namespace prefix xsi for type on color is not defined"
It would be nice if initWithContentsOfURL at least loaded in what it
could and then I could ignore the malformed parts, but I guess that's
not the way it works, as it just returns nil and the error.
Am I back to square one, where I need to just beef up my own XML
parser to take care of this, or can I gracefully recover from the
error and load it anyway?
Thanks!
-Chris Gregg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden