Top "Nokogiri" questions

An HTML, XML, SAX and Reader parser for Ruby with the ability to search documents via XPath or CSS3 selectors… and much more

How do I create XML using Nokogiri::XML::Builder with a hyphen in the element name?

I am trying to build an XML document using Nokogiri. Some of the elements have hyphens in them. Here's an …

xml ruby nokogiri
Get text directly inside a tag in Nokogiri

I have some HTML that looks like: <dt> <a href="#">Hello</a> (2009) </dt&…

ruby nokogiri
An error occurred while installing nokogiri (1.5.2)

When I try to run a ruby on rails project I got an error: An error occurred while installing nokogiri (1.5.2), …

ruby-on-rails nokogiri ubuntu-10.10
nokogiri multiple css classes

How is it possible to select an html element that have two classes? For example, how to select the element &…

html css xpath parsing nokogiri
How to add attribute to Nokogiri node?

I'm trying to add an attribute to an existing Nokogiri node. What I've done is this: node.attributes['foobar'] = Nokogiri::…

ruby-on-rails ruby nokogiri
How do I do a regex search in Nokogiri for text that matches a certain beginning?

Given: require 'rubygems' require 'nokogiri' value = Nokogiri::HTML.parse(<<-HTML_END) "<html> <body> <…

ruby nokogiri hpricot
How to get the raw HTML of a node

I am using Nokogiri to analyze some HTML, but, I don't know how get the raw HTML inside a node. …

ruby nokogiri
How to get the last element of a sequence in XPath?

In Ruby we can access an array with negative numbers like array[-1] to get the last object in the …

ruby xpath nokogiri
Rails Tutorial: nokogiri-1.5.2 error on bundle install

After working through the RVM setup, rspec and guard sections of chapter 3 of the Ruby on Rails Tutorial, whenever I …

ruby-on-rails rubygems nokogiri railstutorial.org
How can I get the absolute URL when extracting links using Nokogiri?

I'm using Nokogiri to extract links from a page but I would like to get the absolute path even though …

ruby nokogiri