How can i find
Two options, both using the CSS syntax:
@doc = Nokogiri::HTML.parse(...)
1. Get all of the elements that match that selector:
@doc.css('li.data-brand').each do |elm| # do whatever with elm here end
2. Get the first one in document source order:
elm = @doc.at_css('li.data-brand')
Walter