title: XML: attributes or children?
body: <p>In XSD, SOAP and other XML conventions you'll often see things like:</p>
  
  <pre><code>&lt;book&gt;
   &lt;title&gt;Harry Potter&lt;/title&gt;
   &lt;author&gt;J.K. Rowling&lt;/author&gt;
  &lt;/book&gt;
  </code></pre>
  
  <p>Now I'm wondering, what happened to attributes? To me it makes more sense to write this as:</p>
  
  <pre><code>&lt;book title="Harry Potter" author="J.K. Rowling" /&gt;
  </code></pre>
  
  <p>But apparently, for some reason, smarter people than me chose otherwise.
  Could someone explain why, and what attributes are for then?</p>