第二步: 传到网上, 譬如我是放在: http://www.132435.com/down/test.txt
第三步: 用 TXMLDocument 控件读取, 只需要两行代码:
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, xmldom, XMLIntf, msxmldom, XMLDoc, ExtCtrls;type TForm1 = class(TForm) XMLDocument1: TXMLDocument; procedure FormCreate(Sender: TObject); end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);begin XMLDocument1.LoadFromFile('http://www.132435.com/down/test.txt'); ShowMessage(XMLDocument1.DocumentElement.ChildNodes[0].Text);end;end.