Unit1;
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, xmldom, XMLIntf, msxmldom, XMLDoc, StdCtrls;
TForm1 = (TForm)
XMLDocument1: TXMLDocument;
Button1: TButton;
Button2: TButton;
Button3: TButton;
FormCreate(Sender: TObject);
Button1Click(Sender: TObject);
Button2Click(Sender: TObject);
Button3Click(Sender: TObject);
;
Form1: TForm1;
TForm1.FormCreate(Sender: TObject);
XMLDocument1.LoadFromFile();
;
TForm1.Button1Click(Sender: TObject);
ShowMessage(IntToStr(XMLDocument1.DocumentElement.ChildNodes.Count));
;
TForm1.Button2Click(Sender: TObject);
nodeList: IXMLNodeList;
nodeList := XMLDocument1.DocumentElement.ChildNodes;
ShowMessage(IntToStr(nodeList.Count));
;
TForm1.Button3Click(Sender: TObject);
node: IXMLNode;
nodeList: IXMLNodeList;
node := XMLDocument1.DocumentElement;
nodeList := node.ChildNodes;
ShowMessage(IntToStr(nodeList.Count));
;
.