T
Tony Johansson
Hello!
This question has nothing to do with the actual C# language but .NET is very
tight connected with XML so I assume
many of you are very used to XML therefore I ask this question.
I have two examples below and I just wonder which of these is the best. As
you can see the sex is used as an attribute in one of the example and as an
element in the other.
Can you give a comment which is best and why ?
<person sex="female">
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
<person>
<sex>female</sex>
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
//Tony
This question has nothing to do with the actual C# language but .NET is very
tight connected with XML so I assume
many of you are very used to XML therefore I ask this question.
I have two examples below and I just wonder which of these is the best. As
you can see the sex is used as an attribute in one of the example and as an
element in the other.
Can you give a comment which is best and why ?
<person sex="female">
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
<person>
<sex>female</sex>
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
//Tony