there is a request to the server, form a line and insert certain data, try to insert data from the list, but it seems to be a crutch, how else can I insert data?
public void formationShoppingList(ArrayList<Model> list) { String temp=""; String str; for (int i = 0; i < list.size(); i++) { str = "<ProductName" + i + ">" + list.get(i).getName_tovar() + "</ProductName" + i + ">\n" + "<ProductBrand" + i + ">" + list.get(i).getMark_tovar() + "</ProductBrand" + i + ">\n" + "<ProductPrice" + i + ">" + list.get(i).getCost_tovar() + "</ProductPrice" + i + ">\n"; temp+=str; } Log.d("TAG", temp); }