What you are using to parse the XML is this method:
public Document parse(String uri) throws SAXException, IOException
It basically expect an uri from which to fetch the content. This is not your case, because you already have queried the URL and parsed the contents. You are not supplying what the method expects.
I think you should be all right if you skip all the reading of the connection input stream and just do:
InputStream input = con.getInputStream();
xmlParser(input);
Note I have removed many lines. And then:
protected void xmlParser(InputStream input)
{
try {
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(input);