News for hackers. Stuff that matters.
Re:A Brief Defense of XML by int_19h on Friday January 06, 2023 @08:47PM (#34284150)
There is none. In general, the main difference is that elements are all ordered wrt each other, while attributes are not. This ought to make the choice simple, except that attributes also cannot contain nested data structures.

A particularly unusual take is to ignore the difference and allow either attributes or child elements as different ways to do the same thing. This is what XAML does; e.g. this:

   <Button Content="Foo" />
is identical to:

   <Button>
       <Button.Content>Foo</Button.Content>
   </Button>

There are no comments on this comment yet.