title: Is there a way to get all of a DOMElement's attributes?
body: <p>I'm reading some XML with PHP and currently using the <code>DOMDocument</code> class to do so. I need a way to grab the names and values of a tag's (instance of <code>DOMElement</code>) attributes, without knowing beforehand what any of them are. The <a href="http://us.php.net/manual/en/class.domelement.php" rel="nofollow noreferrer">documentation</a> doesn't seem to offer anything like this. I know that I can get an attribute's value if I have its name, but again, I don't know either of these and need to find both.</p>
  
  <p>I also know that other classes like <code>SimpleXMLElement</code> have this capability, but I'm interested in how it can be done with <code>DOMDocument</code>.</p>