title: Can XPath 1.0 return XML Element names in manner similar to returning node attributes and text?
body: <p>The question(s):
          Can a XPath 1.0 expression return only the names of xml nodes (either qualified or not) and not the entire node? Is XPath 2.0 capable of same?</p>
  
  <hr>
  
  <p>The detail:</p>
  
  <p>I am profiling a series of well-formed xml documents for xml element node usage (ie. obtain aggregate counts of xml nodes across several xml documents). I have a perl script that retrieves a desired node-set of each document, then iterates over each node to obtain counts of the node names using the XML::XPath::Node::Element->getName. I have an alternate implementation that profiles xml node attributes and text values, but use an XPath statement to retrieve the "atomic values" (as opposed to using XML::XPath::Node::Element->getAttribute() or similar in perl). </p>
  
  <p>[Note that I realize the "atomic values" are actually sets of attribute/ text nodes.] </p>
  
  <p>I experience a 50-fold improvement in performance when allowing the XPath expression to return the desired "atomic values" as opposed to looping over results in perl, so I would like to retrieve xml node names in a manner similar to attribute (ie 'attribute::<em>' or '@</em>')and text (ie 'text()') nodes. I've looked over the XPath and XML specs, but have not been able to identify a solution. </p>
  
  <p>edit: To be more specific, I'm looking for something like <code>'local-name(//*)'</code>, but something that returns a set of names for all matching nodes (as opposed to only the first node found).</p>