Can Nokogiri Parse a Nokogiri Object?
Posted
by Jesse J
on Stack Overflow
See other posts from Stack Overflow
or by Jesse J
Published on 2010-05-26T20:15:48Z
Indexed on
2010/05/26
21:11 UTC
Read the original article
Hit count: 487
I'm trying to parse a part of the result of a parse, like this:
queries = @doc.xpath("//spectrum_query")
queries.each do |query|
hits = query.xpath("//search_hit")
end
But instead of Nokogiri only searching for search_hit
s inside the query, it searches for search_hit
s in the whole document. I'm sure there's a different way to accomplish what I want, but doing it like this would be the simplest.
Anyone know if it's possible to search just the query object?
© Stack Overflow or respective owner