因為在 dos command 下會誤判 < 與 > 所以以 %3C 取代 < 以 %3E 取代 > 未修改前的原始碼在我另一問題中, cd c:\program files\google\chrome\application
call chrome 帶入下段資訊 執行有誤,請高手看一下 多謝
http://las.pfeg.noaa.gov/OceanWatch-bin/LASserver.pl?xml=%3C?xml%20version="1.0"?%3E%3ClasRequest%20href="file:las.xml"%3E%3Clink%20match="/lasdata/operations/data_file"/%3E%3Cproperties%3E%3Cferret%3E%3Cformat%3Easc%3C/format%3E%3Cdata_format%3Ecsv%3C/data_format%3E%3Csize%3E.35%3C/size%3E%3Cuse_ref_map%3Efalse%3C/use_ref_map%3E%3Cscript_prefix%3Enolabelnoaspect%3C/script_prefix%3E%3C/ferret%3E%3C/properties%3E%3Cargs%3E%3Clink%20match="/lasdata/datasets/AG/variables/sstamday"/%3E%3Cregion%3E%3Crange%20type="x"%20low="114"%20high="128"/%3E%3Crange%20type="y"%20low="16"%20high="30"/%3E%3Cpoint%20type="t"%20v="16-JUN-2009%2000:00"/%3E%3C/region%3E%3C/args%3E%3C/lasRequest%3E
你的參數有兩個錯誤
1.URLEncode未完整
2.XML 中 tag 未對應(前面是arg後面是args)
建議你先修正XML資料
然後用這裡的URLEncode將XML編碼
然後貼到DOS執行chrome後面的參數
修改後如果如下
<pre class="c" name="code">chrome http://las.pfeg.noaa.gov/OceanWatch-bin/LASserver.pl?xml=%3C%3Fxml+version%3D%221.0%22%3F%3E%3ClasRequest+href%3D%22file%3Alas.xml%22%3E%3Clink+match%3D%22%2Flasdata%2Foperations%2Fdata_file%22%2F%3E%3Cproperties%3E%3Cferret%3E%3Cformat%3Easc%3C%2Fformat%3E%3Cdata_format%3Ecsv%3C%2Fdata_format%3E%3Csize%3E+.35%3C%2Fsize%3E%3Cuse_ref_map%3Efalse%3C%2Fuse_ref_map%3E%3Cscript_prefix%3Enolabelnoaspect%3C%2Fscript_prefix%3E%3C%2Fferret%3E%3C%2Fproperties%3E%3Carg%3E%3Cslink+match%3D%22%2Flasdata%2Fdatasets%2FAG%2Fvariables%2Fsstamday%22%2F%3E%3Cregion%3E%3Crange+type%3D%22x%22+low%3D%22114%22+high%3D%22128%22%2F%3E%3Crange+type%3D%22y%22+low%3D%2216%22+high%3D%2230%22%2F%3E%3Cpoint+type%3D%22t%22+v%3D%2216-JUN-2009+00%3A00%22%2F%3E%3C%2Fregion%3E%3C%2Farg%3E%3C%2FlasRequest%3E
可以得到如下結果
<pre class="c" name="code">
LAS Error
The following error message was received from LAS:
Missing variable arguments
我只解決了 DOS 執行會 Error 的問題
沒花時間去看參數錯誤的問題
那應該要靠你自己比較好