开发者

Android XML parsing problem

I am having problem in parsing the xml data, below is my code

URL url=new URL(Urls.statusUrl);
     SAXParserFactory spf=SAXParserFactor开发者_C百科y.newInstance();
     SAXParser sp=spf.newSAXParser();
     XMLReader xr=sp.getXMLReader();
     FOIA_Parsing_Handler mxmlparsing=new FOIA_Parsing_Handler();
     xr.setContentHandler(mxmlparsing);
     xr.parse(new InputSource(url.openStream()));//Exception at this line

     mStatus=mxmlparsing.getRecords();
     m_adapter=new StatusAdapter(Status_Inquiry.this, R.layout.status_inquiry_view, mStatus);

     mLstViewStatusInquiry.setAdapter(m_adapter);

I am getting

org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 8299: not well-formed (invalid token)

at above line

Regards Saurabh


As suggested by st0le the problem is in xml data I am getting some garbage in xml so the code is coorect

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜