views:

201

answers:

2

Hi,

I'm using Amazon's simpledb in my app. When parsing xml it gives an error with the code 5. ie. NSXMLParserErrorDomain error 5.

Sometimes it works fine and without any significant change in the navigation is gives that error. Again it works fine when i restart the app several times without doing any changes to the code or navigation in the system. I cant figure out the reason why this happens.

thanks

A: 

Debugging 101: look at the headers to find what errors mean.

If you look at NSXMLParser.h, you will see that error 5 is NSXMLParserPrematureDocumentEndError.

I think it's safe to say that the XML document is not complete. How are you loading the document? Are you ensuring that you load the whole document before parsing it?

Rob Keniger
A: 

There was an error when creating the timestamp on the request url. Problem solved.

thanks Rob

sukitha