delphi ½²Êý¾Ý¿âµÄÊý¾Ý·ÅÔÚxmlÎļþÀï
ÇëÎʸßÊÖ£¬delphi£¬ÈçºÎÄܽ«sqlÊý¾Ý¿âtestdabaseÀïµÄÁ½¸ö±í£¬·Ö±ðΪtable1£¬table2£¬½«ÕâÁ½¸ö±íµÄÊý¾Ý·ÅÔÚÒ»¸öxmlÎļþÀï
×Ô¼ºÐ´È룬»òÕßÓÃadoquery¶ÁÈ¡Êý¾Ý¼¯ºó±£´æADOQuery1.SaveToFile('c:\1.xml',pfXML);
1¡¢²»ÖªµÀÄãµÄtable1ºÍtable2×ֶθöÊýºÍÀàÐÍÊÇ·ñÒ»Ö£¬Èç¹û²»Ò»Ñù¾Í²»ºÃ×öµ½£»
Èç¹ûÊÇÒ»Ö±µÄ»°£¬¿ÉÒÔʹÓÃSQLÏȲéѯ³öÀ´£º
select * from table1
union
select * from table2
2¡¢±£´æÎļþ
A¡¢Èç¹ûÄãʹÓõÄÊÇADOQuery¿ÉÒÔʹÓÃÂ¥ÉÏËù˵µÄ£ºADOQuery1.SaveToFile('c:\1.xml',pfXML);
B¡¢Èç¹ûÄãʹÓõÄClientDataSet¿ÉÒÔ£ºClientDataSet.SaveToFile('c:\1.xml');
ÎÒÓõľÍÊÇÿ¸ö±íµÄ×ֶβ»Ò»ÑùµÄ°¡£¿ÇëÎÊÄÄλ¸ßÊÖÄܸæËßϰ¡
Èç¹ûÊÇÁ½¸ö±í£¬ÄܰÑÁ½¸ö±íµÄÊý¾Ý°´ÕÕ˳Ðò·ÅÔÚÒ»¸öxmlÎļþÀïÃæÂð£¿
dsFTClientDataSet.LoadfromFile(ExtractFilePath(Application.ExeName) +
'Memo.xml');
Ò²¿ÉÒÔSaveToFile('c:\1.xml');
ºÍADO²»Ò»Ñù£¬ºÇºÇ£¬¿ÉÒÔÊÔһϡ£
Ïà¹ØÎÊ´ð£º
¾ÍÊÇÒ»¸ö·þÎñ¶ËºÍÒ»¸ö¿Í»§¶Ë£¬Àï±ßÓÐһЩ¹²Óõ¥Ôª £¬ÎÒÔÚ ¹¤³ÌµÄSEARCH PATHÀïÉèÖõÄ·¾¶£¬
Àï±ßÓиö½á¹¹Ì壬ÎÒÔÚ·þÎñ¶Ë´ò¿ª£¬¼ÓÁ˳ÉÔ±£¬µ«ÊÇÎÒÔÚ¿Í»§¶ËÆäËûµ¥Ôª·ÃÎʲ»µ½ÎÒмӵģ¬ÎÒÔÚ¿Í»§¶Ë´ò¿ªÄǸöµ¥Ôª£¬È·Êµ¼ÓÁ ......
txt ºÍXML ¸ñʽÏàÓ¦
²»½èÖúDataSet
µ¼Èë¶ÁÈ¡TXTÎļþ
È»ºóÖ±½ÓдÈëXML(ͬһÎļþ,²»Í¬Êý¾Ý,µÝÔöÔÊý¾ÝûÓб»¸²¸ÇÇé¿öÏÂÔö¼ÓÊý¾Ý.)
½Ì¸öÒªµã»ò×îºÃÊÇÓиö´úÂëÌáʾµÄ
¹ý·ºÃºº °ï¸öæÈö^^
²»»á£¬°ïÂ¥Ö÷ ......
´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽÎļþ
<folder state="unchecked" label="È«²¿">
¡¡¡¡<folder state="unchecked" isBra ......
<XML>
<FLAG>1</FLAG>
<REASON></REASON>
<ADVERT><ADID>64</ADID><ADNAME>Ó¢»ÊÓéÀÖËÄ</ADNAME><ADCONTENT>ÄÚÈÝÒ»</ADCONTENT><ADT ......