program TestXML;{$APPTYPE CONSOLE}{$R *.res}uses System.SysUtils,Xml.xmldom,Xml.XMLIntf,Xml.XMLDoc,ActiveX;varXMLDoc:TXMLDocument;Root,Body,Fault,Node:IXMLNode;beginCoInitialize(nil);tryXMLDoc:=TXMLDocument.Create(nil);XMLDoc.Options:=XmlDoc.Options-[doNodeAutoCreate];XMLDoc.LoadFromFile(‘test.xml‘);Root:=XMLDoc.DocumentElement;Body:=Root.ChildNodes[‘Body‘];Writeln(Body.NodeName);Fault:=Body.ChildNodes[‘Fault‘];Writeln(Fault.NodeName);tryNode:=Fault.ChildNodes[‘faultcode‘];Writeln(Node.Text);except on E:exception doWriteln(E.Message);// "Node "faultcode not found".end;finallyCoUnInitialize;end;end.