获取xml文件属性的代码:
procedure TForm1.Button2Click(Sender: TObject);
var
xml: TNativeXml;
node : TXmlNode;
i: Integer;
begin
xml := TNativeXml.Create(nil);
node := xml.Root.NodeByName('ROWDATA');
for i := 0 to node.ElementCount-1 do
begin
ShowMessage(node.Elements[i].AttributeByName['名称'].Value);
end;
xml.Free;
end;