当前位置:   article > 正文

Get方式请求并获取XML数据格式_get方式能传给xml吗

get方式能传给xml吗
  1. package cn.test;
  2. import java.io.BufferedReader;
  3. import java.io.IOException;
  4. import java.io.InputStreamReader;
  5. import java.net.URI;
  6. import java.net.URISyntaxException;
  7. import java.util.List;
  8. import org.apache.http.HttpEntity;
  9. import org.apache.http.HttpResponse;
  10. import org.apache.http.HttpStatus;
  11. import org.apache.http.client.ClientProtocolException;
  12. import org.apache.http.client.HttpClient;
  13. import org.apache.http.client.methods.HttpGet;
  14. import org.apache.http.impl.client.DefaultHttpClient;
  15. import org.apache.log4j.Logger;
  16. import org.apache.log4j.PropertyConfigurator;
  17. import org.dom4j.Document;
  18. import org.dom4j.DocumentException;
  19. import org.dom4j.Element;
  20. import cn.utils.xmlUtils;
  21. public class WriteResponse2XML{
  22. public static void main(String[] args) throws
  23. URISyntaxException, ClientProtocolException, IOException, DocumentException{
  24. //Get请求的参数
  25. final String URL = "http://search.ifeng.
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/314205
推荐阅读
相关标签
  

闽ICP备14008679号