Comment by Mountain_Skies

5 months ago

Microsoft seems to be especially obsessed with making as much as possible into attributes. Makes me wonder if there is some hidden historical reason for that like an especially powerful evangelist inside the company that loved attributes during the early days of adopting XML.

Attributes are way shorter to write.

That said, these days most Microsoft XML dialects are actually XAML-based, and in XAML attributes are basically syntactic sugar - you can write:

  <Foo Bar="123">

or

  <Foo>
    <Foo.Bar>123</Foo.Bar>
  </Foo>

(the dot in the syntax makes it possible for the XAML parser to distinguish nested elements that represent properties from nested elements that represent child objects)