Possible Duplicate:
Best XML Parser for PHP
Using JAXB with Google Android
I need to add a simple functionality into my Android app.
I must connect to this fictional script: http://test/getMagazinesList.php
The script will return me a XML file like this:
<magazines>
<magazine title="APP 1" id="1">
<description>Prueba real</description>
<miniature>http://web/miniature.jpg</miniature>
</magazine>
<magazine title="APP 2" id="2">
<description>Prueba real 2</description>
<miniature>http://web/miniature2.jpg</miniature>
</magazine>
<magazine title="APP 3" id="3">
<description>Prueba real 3</description>
<miniature>http://web/miniature3.jpg</miniature>
</magazine>
</magazines>
The objective is to store all the info of the XML in a List of these MagazinePreview objects:
public class MagazinePreview {
String title;
String id;
String description;
String miniatureUrl;
Bitmap miniature;
public MagazinePreview(String title, String id, String description,
String miniatureUrl) {
super();
this.title = title;
this.id = id;
this.description = description;
this.miniatureUrl = miniatureUrl;
}
}
Which is the easiest approach to connect to that PHP and get the XML and interpret it storing the info on the List of MagazinePreview class objects?
Thanks