Possible Duplicate:
XML attribute vs XML element
I often tend to create xml out of my c# and php objects with their properties and their data to be able to store the data and structure in files, databases and to be able to port it to other systems.
My question is what the pros and cons are (if any) using an element structure or attribute structure.
Element structure
<Body>
<Row Name="Gender">
<Col>
<Key>FieldId</Key>
<Value>1</Value>
</Col>
<Col>
<Key>ParentId</Key>
<Value></Value>
</Col>
</Row>
<Row Name="Weight">
<Col>
<Key>FieldId</Key>
<Value>3</Value>
</Col>
<Col>
<Key>ParentId</Key>
<Value></Value>
</Col>
</Row>
</Body>
Attribute structure
<Body>
<Row Name="Gender">
<Col Key="FieldId" Value="1" />
<Col Key="ParentId" Value="0" />
</Row>
<Row Name="Weight">
<Col Key="FieldId" Value="2" />
<Col Key="ParentId" Value="0" />
</Row>
</Body>
Any recommendations and advices are welcome!