In XML <person><name>Alice</name><age>30</age></person> is different from <person name="Alice" age="30" /> and they will never (de)serialize to each other. The original example by the articles author with the person is somewhat misguided.
They do contain the same bits of data, but represent different things and when designing your dtd / xsd you have to decide when to use attributes and when to use child elements.
The same data can be portrayed in two different ways.
And that is issue why? The specification decided which one you use and what do you need. For some things you consider things as attributes and for some things they are child elements.
I've been pretty depressed after my burnout few years ago and have been unable to enjoy programming ever since. It's my profession though so I still do it, but outside of the professional stuff I've only had a 1 month this year where I could enjoy sitting on a computer at home and to do some actual coding. Outside of coding there's a lot of pondering, designing, and analysing related to development that I still do and enjoy, but it's exhausting after working.
I'm playing fediverse on hard mode