XML attributes are a legacy from other markup languages. Attributes work well in transformation languages such as HTML or XSL because their tags are actually more akin to commands. Nesting command switches in child elements would make no sense. Placing them inside the tag as attributes makes complete sense. XML, however, is just a container language. It's elements either hold data or they hold other elements that hold data somewhere down the tree. There are no command switches in XML. Arbitrarily placing some data values in elements and other data values in attributes is schizophrenic.
To be clear, the following two XML statements are equivalent.
The second style of XML statement (where data that could have been added as a symmetric element has been arbitrarily added as an assymetric attribute) should be avoided.
When you must deal with XML files that contain attributes, there is a simple solution; convert the attributes to elements.
The following XSLT stylesheet, courtesy of O'Reilly's CD bookshelfs, does just that for any XML document.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">