易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi与XML文档

同步程序案例
procedure TGetOrderThread.PostDB(webnr:WideString);
var
  Err: String;
  SetWebnr:WideString;
  xmlDoc: IXMLDocument;
  root: IXMLNode;
  rowc: IXMLNode;//记录数
  rows: IXMLNodeList;//主记录列表
  row: IXMLNode;
  drows: IXMLNodeList;//明细列表
  drow: IXMLNode;
  i,j,slhj,jlhj:integer;
  djhj:real;
begin
  //同步数据
  xmlDoc := TXMLDocument.Create(nil);
  try
    xmlDoc.XML.Text:=Webnr;
    xmlDoc.Active:=true;
    root:=xmlDoc.DocumentElement;
    rowc:=root.ChildNodes.FindNode('RowC');
    if (rowc.NodeValue>0) and DBconn then
    begin
      rows:=root.ChildNodes.FindNode('RowS').ChildNodes;
      //showmessage('记录数:'+rowc.NodeValue);
      for i:=0 to rows.Count-1 do
      begin
        ADOConn.BeginTrans;
        try
          row:=rows.Nodes[i];
          drows:=row.ChildNodes.FindNode('Drows').ChildNodes;
          //showmessage(row.ChildValues['billno']+
          //  ' 明细记录数:'+inttostr(drows.Count));//显示订单号
          if SHelper.Active then SHelper.Close;
          SHelper.SQL.Text:=Format(selectStr,[row.ChildValues['billno']]);
          SHelper.Open;
          jlhj:=0;
          slhj:=0;
          djhj:=0;
 &nb


相关文档:

asp、delphi、oracle的技术文档总结

1) Delphi向oracle中传递参数 如oracle中的参数名为erpcx 
答:如果想从表里取值到oracle,则erpcx:=trim(aq1.fieldbyname('erpcx').AsString);
否则直接用控件名字
语句为
with aperp do    
begin
connection:=dm.ADOCerp;      
parameters.Clear;&nbs ......

Delphi的快捷键


 
//**************需要强调的两个快捷键**********************
51.CTRL+SHIFT+U     代码整块左移2个空格位置
52.CTRL+SHIFT+I     代码整块右移2个空格位置
60.Ctrl+Alt+c       注释块
61.Ctrl+Alt+u    & ......

解析xml文件的几种常见的方法

xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<mobile-list>
<mobile type="Nokia2652">
<wap2>false</wap2>
<width>115</width>
</mobile>
<mobile type="Nokia2650">
......

用dom来解析xml文件

xml文件为:
<?xml version="1.0" encoding="UTF-8"?>
<mobile-list>
<mobile type="Nokia2652">
<wap2>false</wap2>
<width>115</width>
</mobile>
<mobile type="Nokia2650">
<wap2>false</wa ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号