【发布时间】:2013-07-12 12:05:25
【问题描述】:
这是我想做的事情。 我的程序运行良好:
XMLText = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' +
'<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' +
'<title>Harry Potter</title>' +
'<author>J. K. Rowling.</author>' +
'<length>400</length>' +
'</book>';
procedure TForm1.Button1Click(Sender: TObject);
var
XMLDoc: IXMLDOMDocument;
Node, SibNode: IXMLDOMNode;
begin
Memo1.Clear;
XMLDoc := CoDOMDocument.Create;
XMLDoc.loadXML(XMLText);
end;
现在我想从项目所在的同一文件夹中导入包含 6000 本书 (books.xml) 的 XML 文件,而不是 const XMLText。我该怎么做?
谢谢! :)
【问题讨论】:
标签: xml delphi delphi-xe3