title: XPath expression for selecting all nodes with a common attribute
body: <p>a book I'm reading on XML says that to select all nodes in an XML file that have a specific attribute, use the syntax:</p>
  
  <pre><code>//*/@_attribute_
  </code></pre>
  
  <p>What I don't understand is why the asterisk is needed. As I understand it, the expression // selects all descendants of the root node. So, wouldn't //@lang, for example, select all descendants of the root node that have an attribute called "lang"? I can't even interpret what the asterisk even means in the above expression (I know the asterisk in general means "all"). If someone could break it down for me I'd really appreciate it.</p>
  
  <p>Thanks</p>