//You need to use these units uses SysUtils, Dialogs, XMLIntf, XMLDoc; //.............................................. //This function process the XML function GetStudents(aXMLInput: string): string; var XMLDoc: IXMLDocument; i: Integer; begin //Creating the TXMLDocument instance XMLDoc:= TXMLDocument.Create(nil); //Loading8 the XML string XMLDoc.LoadFromXML(aXMLInput); //Parsing the xml document for i:=0 to XMLDoc.DocumentElement.ChildNodes.Count - 1 do Result:= Result + XMLDoc.DocumentElement.ChildNodes.Get(i).GetAttributeNS('Name', '') + #13#10; //Removing the trailing #13#10 characters Result:= Trim(Result); end; //.............................................. //Consuming code example (fragment) var XMLInput: string; begin XMLInput:= '' + '' + '' + '' + '' + '' + '' + ''+ ''; Showmessage(GetStudents(XMLInput)); end;