Communication Error Operation couldn’t be completed

Asked By 60 points N/A Posted on -
qa-featured

Hello,

The download of XML from the webservers with a URL pointing to the server’s file went perfectly I think. However, the problem is I am not able to reach the network. I need help to rectify this error before it creates a huge mess. Someone could help me to solve this error. Thanks for your help. Your help is appreciated.

 

Communication Error

Operation couldn’t be completed.

(NSXMLParserErrorDomain error 5.)

SHARE
Answered By 0 points N/A #172604

Communication Error Operation couldn’t be completed

qa-featured

The explanation of the error you're receiving (error 5) is "NSXML Parser Premature Document End Error. The document ended unexpectedly." The most common cause of this error is the wrong location of the file itself. If you're loading your file by using:

"[NSURL URLWithString:pathToFile];

this error will appear. Instead, you should use:

[NSURL fileURLWithPath:pathToFile]; 

Related Questions