package testxml; import java.io.InputStream; import java.util.List; import com.yf.pullxmlpare.PersonService; import com.yf.pullxmlpare.person; import android.test.AndroidTestCase; import android.util.Log; public class TestXML extends AndroidTestCase { private final String TAG = "TestXML"; public void testperson() throws Exception{ InputStream xml = this.getClass().getClassLoader().getResourceAsStream("person.xml"); List<person> ps1 = PersonService.getPersons(xml); for(person personx:ps1){ Log.i(TAG, personx.toString()); } } } |