Having trouble reading XML file from Windows server. Works on Linux
- by DuFF14
I'm parsing an XML file in an android app. My success varies depending upon where the file is hosted. After hosting the file on 4 different servers (2 Linux, 2 Windows), I discovered that when the xml is hosted on a Linux server, the app works. When it's hosted on a Windows server, I am unable to parse correctly. Instead of reading the expected xml tags, it reads HTML tags (, , , etc). I'm not sure why it doesn't work on Windows servers, or if that is even the issue and not just a coincidence. Any help is appreciated.
Thanks.
Here is my code:
private void getXmlData() {
HttpClient httpclient = new DefaultHttpClient();
String url = XML_URL;
HttpPost httppost = new HttpPost(url);
HttpResponse response = httpclient.execute(httppost);
SaxParser saxParser = new SaxParser(response);
parsedXML = saxParser.parse();
}