Converts the attributes array of a document node into a Hash. Returns an empty Hash, if node has no attributes.
| node: | Document node to extract attributes from. |
Source Code
# File active_support/vendor/xml-simple-1.0.11/xmlsimple.rb, line 706 def get_attributes(node) attributes = {} node.attributes.each { |n,v| attributes[n] = v } attributes end
<code/>and<pre/>for code samples.