private Method

XmlSimple.get_attributes(node)

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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.