据我所知Delphi中的TXMLDocument没有selectNodes方法
但感觉Delphi也算是强大了,应该有类似的解决方法吧用于快速定位吧.
哪位高手指点一下,万分感谢!

解决方案 »

  1.   

    用原生的吧
    xml对像吧,和控制word的原理一样
      

  2.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      SelectIntf:IDOMNodeSelect;
      listIntf:IDOMNodeList;
      pathstr:string;
    begin
      pathstr:='/Countries/Country'; //这儿就是XPATH查询串。
      SelectIntf:=XMLDocument1.DOMDocument as  IDOMNodeSelect;
      listIntf:=SelectIntf.selectNodes(pathstr);
      ShowMessage(intToStr(listIntf.length));
    end;
    来自↓
    http://expert.csdn.net/Expert/topic/2848/2848152.xml?temp=.4627191
      

  3.   

    谢谢两位,我本来计划实不不行就用微软的com呢,现在好了.
      

  4.   

    如何将文件保存为扩展名为.xml的文件