-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a huge XML(400MB) containing products. Using a DOM parser is therefore excluded, so i tried to parse and process it using a pull parser. Below is a snippet from the each_product(&block) method where i iterate over the product list.
Basically, using a stack, i transform each <product>…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
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_hits inside the query, it searches for search_hits in the whole document…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm getting a segfault in nokogiri (1.4.1) run (under cucumber 0.6.1/webrat 0.7.0/rspec 1.3.x)
response.should have_selector("div", :class => "fieldWithErrors")
and the div in the page is actually
<div class="fieldWithErrors validation_error"> stuff </div>
Everything runs fine…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm confused. It's a regular state of affairs for me but specifically in this case I felt I could reach out to fellow stackoverflowers (that is, stackoverflow-ers, not stackover-flowers).
uname -a
Darwin macbookpro 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I have a simple task of accessing the values of some attributes. Below is a simple script that uses Nokogiri::XML::Builder to create a simple xml doc.
require 'nokogiri'
builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
xml.Placement(:messageId => "392847-039820-938777"…
>>> More