下面这段json解析的代码怎么才能转成xml解析?
public boolean parse() {
`
Log.i(new String(reqData));
String whereByteId = "";
Cursor c = null;
File dir = new File(folder);
if (dir.exists()) {
if (!deleteDir(dir)) {
//return;
}
}
try {
dir.mkdir();
} catch (Exception e) {
}
try {
JSONArray jAReq = new JSONArray(new String(reqData));
for (int i=0; i<jAReq.length(); i++) {
String byteid = (String) jAReq.opt(i);
if (whereByteId.length() == 0) {
whereByteId = "(\'" + byteid;
} else {
whereByteId += "\',\'" + byteid;
}
}
} catch (JSONException e) {
// TODO: handle exception
Log.i(e.getMessage());
}
if (whereByteId.length() != 0) {
whereByteId += "\')";
}