how to split a string of data into different list views?
Would I be able to split a string of data starting with <NewData>
with several different objects inside such as <Schedule>
ending in </Schedule>
and then ending over all with a </NewData>开发者_如何学编程
. Split that into several list views each schedule in a different list view? quite difficult to explain so any thing I've missed just say...
Umm I'll only give you a hint,
String stuff = "<Schedule> save kittens </Schedule> " +
"<Schedule> and puppies </Schedule>" ;
String [] result = stuff.split("<Schedule>");
for(int i = 0; i < result.length; i++)
{
if(result[i].length() > 0)
Log.d("TODO", " - " + result[i].substring(0, result[i].indexOf("<")));
}
精彩评论