如何保存对xml的soap响应?我尝试使用tstringlist,filestream,创建了xml文件,但是我得到了
无法将varinat类型(null)转换为(type(olestr)
我尝试了这个简单的代码.响应不是空的.文件大小40MB.Delphi XE3.
procedure TForm1.HTTPRIO1AfterExecute(const MethodName: string;
SOAPResponse: TStream);
var xml : TStringlist;
begin
xml := TStringlist.create;
try
soapresponse.Position:=0;
xml.LoadFromStream(SOAPResponse);
xml.SaveToFile('...file.xml');
finally
xml.Free;
end;
end;
Run Code Online (Sandbox Code Playgroud)
这是问题(空行)?或不 ?
...
- <leiras>
- <![CDATA[
* Socket AM2 for AMD Athlon™ 64FX / 64X2 / 64 and Sempron processors
* ULi M1697
1. Supports FSB 1000MHz (2.0GT/s), Hyper-Transport Technology and AMD Cool 'n' Quiet Technology
2. Untied Overclocking : During Overclocking, FSB enjoys better margin due to fixed PCIE/ PCI Buses
3. …Run Code Online (Sandbox Code Playgroud)