XML is horrible file format and ends up in religious wars. Do whatever you feel is best at the time, provided you can justify it. However, your particular examples are significantly different:
In 1, sitemap encapsulates a category encapsulating a section which encapsulates the page.
In 2, sitemap encapsulates a page which encapsulates three items: category, section, title and URL. None of these three items contains any other, they are siblings, all commonly held within the page.
As two different structures, it depends on which you intended.
A different question would be the preference for attributes versus first-level tags. But as I say, that is a different question!