http://www.jxhdfc.cn/jxhdwebservice/jxhdservice.asmx/Jxhdfy
这是对方提供的一个webservice页面,现问:我怎么把 前1000个talble中的trade   districtname 这二个字段的值输出来,thanks

解决方案 »

  1.   

    $path = "download_hd.xml";
    $client = new SoapClient("http://www.jxhdfc.cn/jxhdwebservice/jxhdservice.asmx?WSDL",array('encoding'=>'UTF-8'));
    $result = $client->__call("Jxhdfy",array());
    //print_r($result);
    $rs = $result->JxhdfyResult->any;
    //echo $rs;
    if(file_exists($path)){
    file_put_contents($path,$rs);
    $xml = new DOMDocument();
    $xml ->load($path);
    $table = $xml->getElementsByTagName("Table");
    $i=0;

    foreach($table as $list){
    if($i>100){break;}
    //feild count:21
    $row["trade"]  = $list->getElementsByTagName("trade")->item(0)->nodeValue;
      

  2.   

    参考
    http://topic.csdn.net/u/20081129/11/6f226b76-2495-4eb5-a98b-246564bfb07e.html