/* * call-seq: * namespaces() * * returns a hash containing the node's namespaces. */ static VALUE namespaces(VALUE self) { /* this code in the mode of xmlHasProp() */ xmlNodePtr node ; VALUE attr ; attr = rb_hash_new() ; Data_Get_Struct(self, xmlNode, node); Nokogiri_xml_node_namespaces(node, attr); return attr ; }