2011-07-07 25 views
0

爲了得到這個XML文件:問題從瀏覽器中對特定的XML文件get命令

<?xml version="1.0" encoding="UTF-8"?> 
<root> 
    <command action="retrieve" id="1234" code = "24" > 
    </command> 
</root> 

我總是會發出此(使用Tomcat服務器)從瀏覽器中得到命令:

http://localhost:8080/program?command=retrieve&id=1234&code=24 

但是,如果在XML改變,現在我有這樣的一個:

<?xml version="1.0" encoding="UTF-8"?> 
<root> 
    <command action="retrieve" id="1234" code = "24" > 
     <subelement id = "1">SomeStringhere</subelement> 
     <subelement id = "2">SomeOtherStringHere</subelement> 
    </command> 
</root> 

我怎麼能寫信我的GET命令的subeleme整合文件的nts?

謝謝。

回答

2

將URL映射到資源取決於服務器。

如何讓服務器響應具有第二組示例數據的請求取決於您編寫和映射/編程的servelet(或其他)。

+0

嗯,我是新來的,所以我不明白很好 – Kobe