xml Parsinmg error: 08-31 17:20:29.324: E/Error:(12343): unterminated entity ref in java.io.InputStreamReader



I have below xml .



<?xml version="1.0"?>
<indvideo>
<video id="257">
<caption>মগবাজারে তিন খুন</caption>
<link>http://ift.tt/1u1KPVf;
<date>2014-08-29</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="255">
<caption>আজকের বাংলাদেশ</caption>
<link>http://ift.tt/1u1KMZB;
<date>2014-08-19</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="256">
<caption>বেকার তোবার শ্রমিকেরা</caption>
<link>http://ift.tt/1wVTeOP;
<date>2014-08-19</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="252">
<caption>২০ দলের সমাবেশ</caption>
<link>http://ift.tt/1u1KPVn;
<date>2014-08-18</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="253">
<caption>আজকের বাংলাদেশ</caption>
<link>http://ift.tt/1wVTf57;
<date>2014-08-18</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="254">
<caption>খাতুনগঞ্জ থেকে মতিঝিল</caption>
<link>http://ift.tt/1u1KMZF;
<date>2014-08-18</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="251">
<caption>বিচারপতিদের অভিশংসন ক্ষমতা</caption>
<link>http://ift.tt/1wVTf59;
<date>2014-08-16</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="250">
<caption>পালিত হচ্ছে শোক দিবস</caption>
<link>http://ift.tt/1u1KPVt;
<date>2014-08-15</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="246">
<caption>আজকের বাংলাদেশ</caption>
<link>http://ift.tt/1wVTf5e;
<date>2014-08-12</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
<video id="247">
<caption>জ্বালানি তেলের দাম </caption>
<link>http://ift.tt/1u1KMZK;
<date>2014-08-12</date>
<videoimage>http://ift.tt/1u1KPVh;
</video>
</indvideo>


when i am parsing this with below code



public ArrayList<NewsItem> getVideoListFromXML(String url) {

ArrayList<NewsItem> newsItemList = new ArrayList<NewsItem>();

XMLParser parser = new XMLParser();
String xml = parser.getXmlFromUrl(url, ""); // getting XML
Document doc = parser.getDomElement(xml); // getting DOM
Log.e("xml:", "" + xml);

NodeList nodeList = doc.getElementsByTagName(KEY_VIDEO_ITEM);

Log.e("Node Length():-----", "" + nodeList.getLength());

for (int i = 0; i < nodeList.getLength(); i++) {

Element e = (Element) nodeList.item(i);

NewsItem aNews = new NewsItem();

String news_Title = parser.getValue(e, NODE_VIDEO_TITLE);
aNews.setNews_Title(news_Title);

String video_link = parser.getValue(e, NODE_VIDEO_LINK);
aNews.setVideo_Link(video_link);

String video_date = parser.getValue(e, NODE_VIDEO_DATE);
aNews.setDate(video_date);

Log.e("NODE_VIDEO_TITLE", "" + aNews.getNews_Title());
Log.e("NODE_VIDEO_LINK", "" + aNews.getVideo_Link());
Log.e("NODE_VIDEO_DATE", "" + aNews.getDate());

newsItemList.add(aNews);

}

return newsItemList;
}


My parsing gives error like below:



08-31 17:20:29.324: E/Error:(12343): unterminated entity ref (position:ENTITY_REF @3:108 in java.io.InputStreamReader@444ccbf0)

No comments:

Post a Comment