to_hash (LibXML::Conversions::Node)

    # File lib/active_support/xml_mini/libxml.rb, line 40
          def to_hash(hash={})
            if text?
              raise LibXML::XML::Error if content.length >= LIB_XML_LIMIT
              hash[CONTENT_ROOT] = content
            else
              sub_hash = insert_name_into_hash(hash, name)
              attributes_to_hash(sub_hash)
              if array?
                children_array_to_hash(sub_hash)
              elsif yaml?
                children_yaml_to_hash(sub_hash)
              else
                children_to_hash(sub_hash)
              end
            end
            hash
          end