I have one link
http://devappandroid.com/Android_App/test_uploada%20.html
on that i am uploading A Image and as a response i am getting file with content
and I want to read this file
my code is here
final String feedUrlString = "http://www.icoke.com.tw/iCoke/summer2011/jsp/upload.html";
String sen;
Element e;
DocumentBuilderFactory docBuilderFactory;
DocumentBuilder docBuilder;
Document doc;
URL url;
docBuilderFactory = DocumentBuilderFactory.newInstance();
try {
docBuilder = docBuilderFactory.newDocumentBuilder();
url = new URL(feedUrlString);
doc = docBuilder.parse(new InputSource(url.openStream()));
doc.getDocumentElement().normalize();
e = doc.getDocumentElement();
NodeList nl = e.getElementsByTagName("data");
Element data = (Element) nl.item(0);
sen = data.getAttribute("value");
System.out.println(sen);
} catch (Exception ex) {
System.out.println("Error");
}
But i cannot read that file please help me,
Thanks.
try this….
it may useful.
you may need to download libraries from here (download HttpClient 4.1-Beta1 zip file)