delphi中调用http xml


uses
comobj;

var
responseText: WideString;
xmlHttp: OLEVariant;
begin
try
xmlHttp:=CreateOleObject('Msxml2.XMLHTTP');
xmlHttp.open('GET',url,false);
xmlHttp.send();
responseText:=xmlHttp.responseText;
if xmlHttp.status='200' then
begin
//
end;
xmlHttp := Unassigned;
except
//
end;
end;

//**********************************************读取分析文件

uses
msXml,ComObj;

procedure TForm1.Button1Click(Sender: TObject);
var
xmlDoc : IXMLDOMDocument;
xmlNode : IXMLDOMNode;
i : integer;
begin
xmlDoc:=IXMLDOMDocument(CreateOleObject('MSXML.DOMDocument'));
xmldoc.load('c:\dd.xml');
for i:= 0 to xmldoc.getElementsByTagName('R').length -1 do
begin
showmessage(xmldoc.getElementsByTagName('R').item[i].text);
end;
xmldoc.getElementsByTagName('R').item[0].text := '10';
xmldoc.save('c:\dd.xml');
end;

联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678