public static List<Photo> parsePhoto(Node root) { List<Photo> photos = new ArrayList<Photo>(); List<Node> nodes = root.child("photo"); for (Node node : nodes) photos.add(new Photo(node)); return photos; }
public static List<Album> parseAlbum(Node root) { List<Album> albums = new ArrayList<Album>(); List<Node> nodes = root.child("album"); for (Node node : nodes) albums.add(new Album(node)); return albums; }