标签:div string att sharp XML reader etl widget try
package com.cuthead.thishitler; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import org.xml.sax.SAXException; import android.util.Xml; import android.app.ListActivity; import android.os.Bundle; import android.widget.ArrayAdapter; public class MainActivity extends ListActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String[] str = {"ycy","ljw"}; ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_expandable_list_item_1,str); hitler hitler2 = new hitler(); String str2 = "heil"; Reader reader = new StringReader(new String(str2)); try { Xml.parse(reader, hitler2); } catch (IOException e) { } catch (SAXException e) { } setListAdapter(adapter); } }
package com.cuthead.thishitler; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; public class hitler extends DefaultHandler { public static final String TAG_UPDATED = "updated"; public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (TAG_UPDATED.equals(localName)) { } } }
标签:div string att sharp XML reader etl widget try
原文地址:https://www.cnblogs.com/cuthead/p/sax.html