uses xmldom, XMLIntf, msxmldom, XMLDoc;var XMLDoc: IXMLDocument; ItemNode: IXMLNode;begin XMLDoc := TXMLDocument.Create(nil); try XMLDoc.LoadFromXML(sXML);//加载你的XML信息或者LoadFromFile; ItemNode := XMLDoc.DocumentElement; //读取属性值 id := ItemNode.Attributes['ID']; ReturnCode := ItemNode.Attributes['ReturnCode']; // 同样的方法 ..... finally xmldoc := nil; end;end;