Reputation: 97
I need to read this kind of XML files.. I wrote many codes, all are not working..
nodelist = doc.getElementsByTagName("Table");
} catch (Exception e) {
Log.e("Error", e.getMessage());
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void args) {
for (int temp = 0; temp <nodelist.getLength(); temp++) {
Node nNode = nodelist.item(temp);
if (nNode.getNodeType() == Node.ELEMENT_NODE) {
Element eElement = (Element) nNode;
textview.setText(getNode("StaffID", eElement));
This code does not works..Please help me. Thanks in advance
Upvotes: 1
Views: 57
Reputation: 14622
The code you try to parse is NOT xml. It is JSON. First try to learn what is JSON. Later try to parse it with JsonObject or maybe GSON. Here are a link to help you understand what is JSON.
Upvotes: 1