Handling malformed xml and preserving newlines while creating NSXmlDocument
Handling malformed xml and preserving newlines while creating NSXmlDocument
- Subject: Handling malformed xml and preserving newlines while creating NSXmlDocument
- From: aashish tiwari <email@hidden>
- Date: Mon, 23 Apr 2007 07:02:56 +0100 (BST)
Hi All,
My cocoa application creates
NSXmlDocument with the response string from my server.
As our server can always send malformed xml, Initially
i used...
NSXMLDocument *XMLDoc = [[NSXMLDocument alloc]
initWithXMLString:response options:
NSXMLDocumentTidyXML error:&err];
but this removed all the newlines from the string
received from server, then i used....
NSXMLDocument *XMLDoc = [[NSXMLDocument alloc]
initWithXMLString:response options:
NSXMLDocumentTextKind error:&err];
that preserved the newlines but failed to handle
malformed xml and this function call returned nil with
error 'Internal error at line no. xyz" many a times.
I tried to use NSXMLDocumentTextKind and
NSXMLDocumentTidyXML in combination by bitwise ORing
them, but it dint worked.
If you can tell me a way of preserving newlines and
also handling malformed xml then it would be a great
help.
Thanks,
Aashish
___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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