Exception While Parsing Xml In Android
I try to parse xml from this source Following is my parsing code: while (eventType != XmlPullParser.END_DOCUMENT) { switch (eventType) { case XmlPullPar
Solution 1:
It is very likely that you don't try to parse the XML that you think. Instead you seem to parse a HTML document, which is not well formed. This happens because some of the HTML tags don't require closing tags and you actually run into one of them like in the following example:
<head>
<link rel="stylesheet"type="text/css" href="theme.css">
</head>
So please make sure that you really try to parse the XML that you intend to. Either check the URL that you try to get the XML from. The link that you provided should actually work but maybe you have a typo in your code.
Additionally debug your code and check what's inside your InputStream. I guess inside there's something very different from what you expect.
Post a Comment for "Exception While Parsing Xml In Android"