This is my jsoup parser to extract soap content
doc = Jsoup.parse(getxml,"", Parser.xmlParser());
Elements taux = doc.select("taux");
Elements devise = doc.select("devise");
Elements datecours = doc.select("dateCours");
Elements libelle = doc.select("libelle");
Elements quotite = doc.select("quotite");
Elements fixing = doc.select("fixing");
Maybe this will help you. After getting the elements from the web service, assuming that all of the strings contain a large string with separated values, do the following:
String[] deviseSeparated = devise.split(" ");
String[] datecourSeparated = datecour.split(" ");
String[] libelSeparated = libel.split(" ");
String[] quotSeparated = quot.split(" ");
String[] fixSeparated = fix.split(" ");
and after that, assuming that all of the arrays are the same size, just execute this for loop, to initiate the objects:
for (int i = 0; i < deviseSeparated.length; i++) {
PostList.add(new convertor_pst(deviseSeparated[i],datecourSeparated[i],libelSeparated[i],quotSeparated[i],fixSeparated[i]));
}
Is this what you are looking for?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.