I'm writing an android application, and I would like to get an xml string from web and get all info it contains. First of all, i get the string (this code works):
URL url = new URL("here my adrress");
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String myData = reader.readLine();
reader.close();
Then, I use DOM:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource is = new InputSource();
is.setCharacterStream(new StringReader(myData));
Still no problem. When I write
Document doc = db.parse(is);
the application doesn't do anything more. It stops, without errors. Can someone please tell me what's going on?