如何将一个xml文件的内容读如dbgrid; 如何将一个xml文件的内容读如dbgrid;其中使用了TXMLDocument,页面上有 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这是一个xml文件<?xml version="1.0" encoding="UTF-8"?><personcode> <code> <name>庞</name> <pcode>pang</pcode> <notes>庞</notes> </code> <code> <name>刘</name> <pcode>liuhao</pcode> <notes>刘</notes> </code> <code> <name>李</name> <pcode>li</pcode> <notes>李</notes> </code></personcode> type PTpersoncode = ^Rcrdpersoncode; Rcrdpersoncode = record name: string; pcode: string; notes: string; end; var xmlRowNodeList: IXMLNodeList; xmlRowNode: IXMLNode; intForLoop: integer; Ppersoncode :PTpersoncode;for intForLoop := 0 to xmlRowNodeList.Count - 1 dobegin xmlRowNode := xmlRowNodeList.Get(intForLoop); Ppersoncode^.name := xmlRowNode.Attributes['name']; ... lstResult.Add(Ppersoncode);end; sgResult.RowCount := lstResult.Count + 1; for intForLoop := 0 to lstResult.Count - 1 do begin Ppersoncode := lstResult.Items[intForLoop]; sgResult.Cells[1,intForLoop+1] := Ppersoncode^.name; ... end;但是我不知道如何将xml文件的内容读入QReport做打印报表,希望能交流 ADOQuery1.LoadFromFile('G:\Client.xml');ADOQuery1.Close;ADOQuery1.Open;添加一DataSource跟DBGrid不就行了 自包装Class和默认函数,求解(菜鸟) 求开发主程序框架!DELPHI,自己报价。 fastreport根据条件打印页脚的问题 请问我的报表为什么只能显示一行阿 临时表 继承问题。 在SQLServer7.0中两台机器的数据库HS的表FuncTree的相互更新 谁知道有关delphi源码网站? 使用Clientdataset时怎样知道SQL语句被正确执行。 MIDAS究竟是怎样实现将规则放在服务器端的呢? 如何安装xpmenu?我菜不好意思! windows2003 + delphi 5,鼠标移动到变量上,为什么不能出现hint
<?xml version="1.0" encoding="UTF-8"?>
<personcode>
<code>
<name>庞</name>
<pcode>pang</pcode>
<notes>庞</notes>
</code>
<code>
<name>刘</name>
<pcode>liuhao</pcode>
<notes>刘</notes>
</code>
<code>
<name>李</name>
<pcode>li</pcode>
<notes>李</notes>
</code>
</personcode>
PTpersoncode = ^Rcrdpersoncode;
Rcrdpersoncode = record
name: string;
pcode: string;
notes: string;
end; var
xmlRowNodeList: IXMLNodeList;
xmlRowNode: IXMLNode;
intForLoop: integer;
Ppersoncode :PTpersoncode;for intForLoop := 0 to xmlRowNodeList.Count - 1 do
begin
xmlRowNode := xmlRowNodeList.Get(intForLoop);
Ppersoncode^.name := xmlRowNode.Attributes['name'];
...
lstResult.Add(Ppersoncode);
end; sgResult.RowCount := lstResult.Count + 1;
for intForLoop := 0 to lstResult.Count - 1 do
begin
Ppersoncode := lstResult.Items[intForLoop];
sgResult.Cells[1,intForLoop+1] := Ppersoncode^.name;
...
end;
但是我不知道如何将xml文件的内容读入QReport做打印报表,希望能交流
ADOQuery1.Close;
ADOQuery1.Open;
添加一DataSource跟DBGrid不就行了