use of com.androidquery.util.XmlDom in project androidquery by androidquery.
the class ImageLoadingList4Activity method convertAll.
private List<Photo> convertAll(XmlDom xml) {
List<XmlDom> entries = xml.children("entry");
List<Photo> result = new ArrayList<Photo>();
for (XmlDom entry : entries) {
result.add(convert(entry));
}
return result;
}
use of com.androidquery.util.XmlDom in project androidquery by androidquery.
the class ImageLoadingExpandableListActivity method convertAll.
private List<Photo> convertAll(XmlDom xml) {
List<XmlDom> entries = xml.children("entry");
List<Photo> result = new ArrayList<Photo>();
for (XmlDom entry : entries) {
result.add(convert(entry));
}
return result;
}
use of com.androidquery.util.XmlDom in project androidquery by androidquery.
the class ImageLoadingExpandableListActivity method convert.
private Photo convert(XmlDom xml) {
String url = xml.child("content").attr("src");
String title = xml.child("title").text();
String author = xml.child("author").text("name");
String tb = url;
List<XmlDom> tbs = xml.tags("media:thumbnail");
if (tbs.size() > 0) {
tb = tbs.get(0).attr("url");
}
tb = tb.replaceAll("https:", "http:");
Photo photo = new Photo();
photo.url = url;
photo.tb = tb;
photo.title = title;
photo.author = author;
return photo;
}
use of com.androidquery.util.XmlDom in project androidquery by androidquery.
the class ImageLoadingGalleryActivity method convertAll.
private List<Photo> convertAll(XmlDom xml) {
List<XmlDom> entries = xml.children("entry");
List<Photo> result = new ArrayList<Photo>();
for (XmlDom entry : entries) {
result.add(convert(entry));
}
return result;
}
use of com.androidquery.util.XmlDom in project androidquery by androidquery.
the class ImageLoadingGalleryActivity method convert.
private Photo convert(XmlDom xml) {
String url = xml.child("content").attr("src");
String title = xml.child("title").text();
String author = xml.child("author").text("name");
String tb = url;
List<XmlDom> tbs = xml.tags("media:thumbnail");
if (tbs.size() > 0) {
tb = tbs.get(0).attr("url");
//tb = tbs.get(tbs.size() - 1).attr("url");
}
tb = tb.replaceAll("https:", "http:");
Photo photo = new Photo();
photo.url = url;
photo.tb = tb;
photo.title = title;
photo.author = author;
return photo;
}
Aggregations