3 ms·
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
by int_19h 2y ago
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)