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
Ïà¹ØÎĵµ£º
±±¾©ÌÚ¶ÈÍøÂç¿Æ¼¼ÓÐÏÞ¹«Ë¾
µØÖ·:±±¾©º£µíÇøÑ§Çå·
µç»°:82755789
Òò¹¤×÷ÐèÒª,ÏÖÃæÏò±±¾©ÕÐÆ¸ÒÔÏÂְλ.
DelphiÈí¼þ¹¤³Ìʦ
1¡¢¾«Í¨Delphi¿ª·¢£¬ÊìϤVCL¼Ü¹¹£¬´úÂë·ç¸ñÁ¼ºÃ¡£
2¡¢ÓÐÁ¼ºÃµÄÍŶӺÏ×÷¾«Éñ£¬¸»Óд´Ð¾«Éñ;
3¡¢ÊìÏ¤ÍøÂç±à³Ì£¬¶ÔIndy×é¼þ£¬Socket¿ª·¢ÓÐÒ»¶¨µÄÁ˽â;
4¡¢ÊìÏ¤ÃæÏò¶ÔÏó±à³Ì˼Ïë,ÓÐ×é¼þ»ò¿Ø¼þ±à ......
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 ......
ʹÓÃMetadata¼ò»¯±íÊý¾ÝÏòXMLÐÎʽת»¯µÄʵÏÖ
Èç¹ûÐèÒª½«±íÊý¾Ýת»¯ÎªXMLÐÎʽÊý¾ÝµÄ»°£¬Èç¹ûÎÒÃÇʹÓÃSpringµÄJDBC Template£¬ÄÇô³£ÐèÒª×öµÄ¹¤×÷ÊÇ´´½¨Ò»¸öRowMapperÄäÃûÀ࣬ÔÚÆäÖн«×Ö¶ÎÓëÁìÓò¶ÔÏóµÄij¸öÊôÐÔÆ¥ÅäÉÏ£¬È»ºóµÃµ½ÁìÓò¶ÔÏóÁ´±íÐÎʽµÄ½á¹û£¬´ËºóÕ¹¿ªÕâ¸ö¼¯ºÏ£¬ÔÙ½«×Ö¶Îת»¯ÎªXMLÊý¾Ý£¬ÆäÖнøÐÐÁËÁ½´ÎÃû³ÆºÍÖµÖ® ......
<?
/**
* xml2array() will convert the given XML text to an array in the XML structure.
* Link: http://www.bin-co.com/php/scripts/xml2array/
* Arguments : $contents - The XML text
* $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the ......
Ò»¡¢ ÍøÂç²¼¾Ö
һ̨ÖÐÐÄSQL·þÎñÆ÷£¨¼ò³Æ£ºÖÐÐÄ·þÎñÆ÷£©£¬¶ą̀·Ö²¼ÔÚ²»Í¬µØÓòµÄSQL·þÎñÆ÷£¨¼ò³Æ£º±¾µØ·þÎñÆ÷£©£¬¸÷¸ö±¾µØ·þÎñÆ÷ºÍÖÐÐÄ·þÎñÆ÷¶¼ÄÜͨ¹ýinternetʵÏÖÍøÂ绥Á¬¡£
¶þ¡¢ËùÓÃÓïÑÔ¼°Êý¾Ý¿â£ºDelphi +Sql
¶þ¡¢ ͨÐÅÒªÇó
ÿ̨±¾µØ·þÎñÆ ......