SAX パーサーを介して解析し、URL を介して画像を読み込み、次のアクティビティに渡して表示したいと考えています。しかし、私を助けたり、再利用可能なコードを提供してくれる人がいれば、そうすることに失敗しています。これが私のxmlファイルです。これが私の解析済みデータ クラスとアダプター クラスです。(日付、コスト、説明、画像) のようなデータを解析し、すべてを個々のタグの文字列に入れ、必要に応じて次のアクティビティに渡すことができます。また、画像に共有を実装する必要があるので、xmlからの画像のURLが必要です
PARSEDDATA クラス
public class ParseData extends DefaultHandler { boolean title , cost , pubDate , link = false;
StringBuffer stringTitle , stringCost  , stringPubdate , stringLink = null;
ArrayList<String> arrtitle = new ArrayList<String>();
ArrayList<String> arrcost = new ArrayList<String>();
ArrayList<String> arrpubDate = new ArrayList<String>();
ArrayList<String> arrlink = new ArrayList<String>();
//---------START ELEMENT----------//
@Override
public void startElement(String uri , String localName , String qName , Attributes attributes) throws SAXException 
{
    super.startElement(uri, localName, qName, attributes);
    if(localName.equalsIgnoreCase("title"))
    {
        title = true;
    }else if(localName.equalsIgnoreCase("cost"))
    {
        cost = true;
    }else if(localName.equalsIgnoreCase("pubDate"))
    {
        pubDate = true;
    }else if(localName.equalsIgnoreCase("link"))
    {
        link = true;
    }
}
//--------END ELEMENT----------//
@Override
public void endElement(String uri , String localName , String qName) throws SAXException 
{
    super.endElement(uri, localName, qName);
    if(localName.equalsIgnoreCase("title"))
    {
        title = false;
    }else if(localName.equalsIgnoreCase("cost"))
    {
        cost = false;
    }else if(localName.equalsIgnoreCase("pubDate"))
    {
        pubDate = false;
    }else if(localName.equalsIgnoreCase("link"))
        link = false;
}
@Override
public void characters(char[] ch, int start, int length)throws SAXException 
{
    super.characters(ch, start, length);
    if(title)
    {
        stringTitle = new StringBuffer("");
    title_flag = true;
    }
    if(cost)
    {
        stringCost = new StringBuffer("");
        cost_flag = true;
    }
    if(pubDate)
    {
       stringPubdate = new StringBuffer("link");
   pubDate_flag = true;
    }
    if(link)
    {
       stringLink = new StringBuffer("");
       link_flag = true;
    }
}
}
BINDADAPTER クラス
public class BindDataAdapter extends BaseAdapter {
ArrayList<String> title;
ArrayList<String> cost;
ArrayList<String> pubDate;
LayoutInflater inflater;
//---------DEFAULT CONSTRUCTOR-----------//
public BindDataAdapter()
{
}
//-------PARAMETERIZED CONSTRUCTOR------//
public BindDataAdapter(Activity activity , ArrayList<String> title , ArrayList<String> cost , ArrayList<String> pubDate)
{
    this.title = title;
    this.cost = cost;
    this.pubDate = pubDate;
    inflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public int getCount() 
{
    return title.size();
}
@Override
public Object getItem(int position) 
{
    return position;
}
@Override
public long getItemId(int position) 
{
    return position;
}
@Override
public View getView(int position , View convertView , ViewGroup parent) 
{
    if(convertView == null)
    {
        convertView = inflater.inflate(R.layout.list_row , null);
    }
    TextView textViewtitle = (TextView) convertView.findViewById(R.id.type);
    TextView textViewcost = (TextView) convertView.findViewById(R.id.cost);
    TextView textViewdate = (TextView) convertView.findViewById(R.id.date);
    //----I coudnot put text view using setText----//
    return convertView;
}
}
ここに私のMainActivityクラスがあります
public class MainActivity extends Activity {
static final String URLxml = "http://78.46.34.27/kapapps/transaction.xml";
String line = null;
@Override
protected void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    ListView listView = (ListView) findViewById(R.id.listview);
    try 
    {
        SAXParserFactory factory = SAXParserFactory.newInstance();
        SAXParser saxParser = factory.newSAXParser();
        XMLReader reader = saxParser.getXMLReader();
        URL sourceUrl = new URL(URLxml);
        ParseData data = new ParseData();
        reader.setContentHandler(data);
        reader.parse(new InputSource(sourceUrl.openStream()));
        BindDataAdapter bindDataAdapter = new BindDataAdapter(this , data.title , data.cost , data.pubDate);
        listView.setAdapter(bindDataAdapter);
    } catch (ParserConfigurationException e) 
    {
        e.printStackTrace();
    } catch (SAXException e) 
    {
        e.printStackTrace();
    } catch (MalformedURLException e) 
    {
        e.printStackTrace();
    } catch (IOException e) 
    {
        e.printStackTrace();
    }
}
}