<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script> name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3528650120430763&dt=1183799909421&lmt=1183799909&format=468x60_as&output=html&correlator=1183799909421&url=http%3A%2F%2Fpages.google.com%2Fdraft%2FGmai9999%2Fhome%3Fauthtoken%3D397572419ac6db50f5ab16961d0b13491bee0967&ad_type=text_image&ref=http%3A%2F%2Fpages.google.com%2Fpreview%2FGmai9999%2Fhome%3Fauthtoken%3D9686509b5e94c7e953ceecc7a041fbc446802a9a%26no-cache%3D15040874706351293&ui=rc%3A0&flash=9&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">
有时,只需要用XML作一些小的应用,比如只是简单地保存日志或者一些配置,这时我们只需要直接读写XML就好,效率第一。
Delphi盒子有一个 直接读写XML文件 (例子和代码),其核心函数为下面两个函数(一读一写):
{-------------------------------------------------------------------------------











































































































但是上述两个函数有一个问题:它只能按节点名和属性名查找第一条记录。举例:如果要操作类似下述XML文件,节点和属性名相同的有多个,只是属性的值不一样,上面的读写函数就罢工了。




在原有函数的基础上增加了两个参数:








































































写函数











































































name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3528650120430763&dt=1183799909421&lmt=1183799909&format=468x60_as&output=html&correlator=1183799909421&url=http%3A%2F%2Fpages.google.com%2Fdraft%2FGmai9999%2Fhome%3Fauthtoken%3D397572419ac6db50f5ab16961d0b13491bee0967&ad_type=text_image&ref=http%3A%2F%2Fpages.google.com%2Fpreview%2FGmai9999%2Fhome%3Fauthtoken%3D9686509b5e94c7e953ceecc7a041fbc446802a9a%26no-cache%3D15040874706351293&ui=rc%3A0&flash=9&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=480&u_java=true" frameborder="0" width="468" scrolling="no" height="60" allowtransparency="allowtransparency">