And some times i m getting java.net.MalFormedURLException what s the reason behind this and how can i resolve this..
My code is as follows..
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();
/** Send URL to parse XML Tags */
URL sourceUrl = new URL(
"http://w3devadv.liveproj.com /api/apiRequest.php?Method=getdealdetails&DealId=2&SessionId=EA3JQ0RZJT4e66223143fc5");
/**
* Create handler to handle XML Tags ( extends DefaultHandler )
*/
DealsHandler myXMLHandler = new DealsHandler();
xr.setContentHandler(myXMLHandler);
xr.parse(new InputSource(sourceUrl.openStream()));
In handler i m writing the following code in startelement
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
currentElement = true;
if (localName.equalsIgnoreCase("data")) {
dealsdata = new DealsData();
} else if (localName.equalsIgnoreCase("dealdetails")) {
deals = new Deals();
} else if (localName.equalsIgnoreCase("title")) {
deals.title = attributes.getLocalName(0);
}
i m getting the above said exception how can i resolve this.
I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...