如何将XML文档的内容复制到Delphi中的Soaprequest对象?
我想将XML文档的内容复制到Soaprequest中。我该怎么做如何将XML文档的内容复制到Delphi中的Soaprequest对象?,xml,delphi,Xml,Delphi,我想将XML文档的内容复制到Soaprequest中。我该怎么做 procedure TForm4.Httprio2BeforeExecute(const MethodName: string; SOAPRequest: TStream); var FS: TFileStream; txmlheadtype1 : txmlheadtype; //oXML :TXMLDocument; xml : TStringlist; xml1 : TXMLDocument
procedure TForm4.Httprio2BeforeExecute(const MethodName: string;
SOAPRequest: TStream);
var FS: TFileStream;
txmlheadtype1 : txmlheadtype;
//oXML :TXMLDocument;
xml : TStringlist;
xml1 : TXMLDocument;
begin
end;
类似的事情(我脑子里想不出来,根本没有测试过):
类似的事情(我脑子里想不出来,根本没有测试过):
谢谢,它帮助了我,它帮助了我
procedure TMainForm.Httprio2BeforeExecute(
const MethodName: string;
SOAPRequest : TStream);
var
XmlDoc : TXMLDocument;
const
SomeFilename = 'MyDoc.xml';
begin
XmlDoc := TXMLDocument.Create(nil);
try
XmlDoc.LoadFromFile(SomeFilename);
SOAPRequest.Position := 0;
XmlDoc.SaveToStream(SOAPRequest);
finally
XmlDoc.Free;
end;
end;