如何将 XML 文档的内容复制到 Delphi 中的 Soaprequest 对象?
How can i copy the content of an XML document to a Soaprequest object in Delphi?
我想将 XML 文档的内容复制到 Soaprequest.How 中,我可以这样做吗?
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;
我想将 XML 文档的内容复制到 Soaprequest.How 中,我可以这样做吗?
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;