lib/seek/data/search_extraction.rb
def extract_content xml

        doc = LibXML::XML::Parser.string(xml).parse
        doc.root.namespaces.default_prefix="ss"

        content = doc.find("//ss:sheet[@hidden='false' and @very_hidden='false']/ss:rows/ss:row/ss:cell").collect do |cell|
          cell.content
        end
        content.reject!{|v| v.blank?}
        content.uniq!
        content
      end
#pulls out all the content from cells into an array
pulls out all the content from cells into an array
pulls out all the content from cells into an array
def extract_content xml
        doc = LibXML::XML::Parser.string(xml).parse
        doc.root.namespaces.default_prefix="ss"
        content = doc.find("//ss:sheet[@hidden='false' and @very_hidden='false']/ss:rows/ss:row/ss:cell").collect do |cell|
          cell.content
        end
        content.reject!{|v| v.blank?}
        content.uniq!
        content
      end
def extract_content xml doc = LibXML :: XML :: Parser . string ( xml ) . parse doc . root . namespaces . default_prefix = "ss" content = doc . find ( "//ss:sheet[@hidden='false' and @very_hidden='false']/ss:rows/ss:row/ss:cell" ) . collect do | cell | cell . content end content . reject! { | v | v . blank? } content . uniq! content end
pulls out all the content from cells into an array
pulls out all the content from cells into an array
xml