我不是經驗豐富的Java和我得到了一些XML的交互工作示例代碼,我唯一的問題是,我需要發佈的數據(用戶名/密碼)將Java爲例,POST
相關代碼:
static String myUrlString = "http://www.grupoandroid.com/interface/mobile/index.php";
protected TheParser(){
try {
this.myUrl = new URL(myUrlString);
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
protected InputStream getInputStream() {
try {
return myUrl.openConnection().getInputStream();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
該代碼似乎與您的問題的要求無關 - GET在哪裏?我不明白XML交互的代碼如何幫助你 - 它是否讀取或寫入服務器的XML? – 2011-05-09 01:15:49