import org.kxml.*;
import org.kxml.parser.*;
try {
Reader r = .....;
XmlParser parser = new XmlParser( r );
}
catch( java.io.IOException e ){
// handle exception....
}
// ?取字串 (exception handling omitted)
String xml = "some xml";
ByteArrayInputStream bin =
new ByteArrayInputStream( xml.getBytes() );
XmlParser parser = new XmlParser( new InputStreamReader( bin ) );
// Read from web (exception handling omitted)
HttpConnection conn = .....;
InputStreamReader doc =
new InputStreamReader( conn.openInputStream() );
XmlParser parser = new XmlParser( doc );
新闻热点
疑难解答