• 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
Handling malformed xml and preserving newlines while creating NSXmlDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Handling malformed xml and preserving newlines while creating NSXmlDocument
      • From: Marcel Weiher <email@hidden>
  • Prev by Date: Re: top broken on PPC?
  • Next by Date: Re: top broken on PPC?
  • Previous by thread: Re: Request for Authors: Focused Cocoa Topic Books
  • Next by thread: Re: Handling malformed xml and preserving newlines while creating NSXmlDocument
  • Index(es):
    • Date
    • Thread