I am having a problem with my own application that parses a xml file using NSXMLParser, however, the file does not have a valid xml start tag. This is how it looks like:
I also get this in the console:
When i try to process a different file, it works perfectly, and this other file has a xml start tag.
I tried allready to open the file to a string and then append the start tag, but when i try to open it the response from the server is like this:
Any suggestions? Using NSXMLDocument perhaps? I have tried NSXMLDocument with the "initWithContentsOfURL:xmlURL options:1 << 10 error:NULL" method but it returns null at initialization...
Code:
<current_observation>
<credit>Weather Underground Personal Weather Station</credit>
<credit_URL>http://wunderground.com/weatherstation/</credit_URL>
<image>
and so on...
Code:
Operation could not be completed. (NSXMLParserErrorDomain error 5.)
When i try to process a different file, it works perfectly, and this other file has a xml start tag.
I tried allready to open the file to a string and then append the start tag, but when i try to open it the response from the server is like this:
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguration and was unable to complete
your request.<P>
Please contact the server administrator,
support@wunderground.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<HR>
<ADDRESS>Apache/1.3.33 Server at b2.wunderground.com Port 80</ADDRESS>
</BODY></HTML>
Any suggestions? Using NSXMLDocument perhaps? I have tried NSXMLDocument with the "initWithContentsOfURL:xmlURL options:1 << 10 error:NULL" method but it returns null at initialization...