similar to: Nokogiri: to_s WITHOUT html surrounding's tags?

Displaying 20 results from an estimated 8000 matches similar to: "Nokogiri: to_s WITHOUT html surrounding's tags?"

2009 Nov 11
2
nokogiri: parsing tags
Hello, I''m trying to use nokogiri gem to parse individual xhtml tags (not the whole html document) and preform some processing on them. Heres an example of a string that I want to process: str = ''<img src="http://www.canadascapital.gc.ca/data/2/rec_imgs/5005_Pepsi_H1NB.gif"/> some text<a href="#">test</a> ....'' The following code
2009 Oct 21
4
XML file using Nokogiri gem
Hello friends, Can you guys give me some idea about how to Create XML file using Nokogiri gem. -- Posted via http://www.ruby-forum.com/.
2009 Oct 20
10
REXML
Hi, How to embed ruby code in xml . here is my XML template : string = <<EOF <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ozxmlscene> <ozml version="4.0"> <styleRun style="1091379" offset="0" length="7"/> <text>The End</text> <object value="84"/> <object
2010 Aug 05
7
Search large XML file -- REXML slower than a slug, regex instantaneous
Got a question hopefully someone can answer - I am working on functionality to match on certain nodes of a largish (65mb) xml file. I implemented this with REXML and was 2 minutes and counting before I killed the process. After this, I just opened the console and loaded the file into a string and did a regex search for my data -- the result was almost instantaneous. The question is, if I can get
2010 Jan 28
1
validates preference of at least one param
I have a simple RESTful search scaffold that finds data in a separate model and controller. [code] <h1>New search</h1> <% form_for(@search) do |f| %> <%= f.error_messages %> <p> <%= f.label :category_id %><br /> <%= f.collection_select :category_id, Category.all, :id, :name, :include_blank => true %> </p> <p> Age
2008 Apr 20
2
mod_rails showing plain text instead of actual page
hello! i got this forum powered by apache and mod_rails lately when i create / edit posts, i get plain html text showing up instead of the actual page. here''s what i see: -- Content-Type: text/html; charset=utf-8 Set-Cookie: _mysite_session=BAh7CzoOcmV0dXJuX3RvMDoKdGl0bGV7BmkVdToJVGltZQ2IDhuAK1UeADoL %250AdG9waWNzewZpBnU7Bw2HDhuA2%252FZJ7zoJdXNlcmkGIgpmbGFzaElDOidBY3Rp
2009 Oct 28
6
undefined method `^' for "e":String
I''m attempting to learn Ruby on Rails, but these errors aren''t helping. I''m currently trying to follow the lessons available on www.learningrails.com. I received this error after trying to visit a page generated by using the scaffold command. Actually, this is all I did up until the error: rails sample2 -d mysql mysqladmin -u root -p create sample2_development ruby
2007 Apr 09
1
Problem on Dreamhost: engine for rails 1.1.6
Hi, I''m trying to set up Substruct (shopping cart engine) on Dreamhost. I failed several times and tracked down to the problem area. I can reproduce the problem with these steps: 1. install rails 2. change public/.htaccess for fcgi 3. change public/dispatch.fcgi for RailsFCGIHandler At this step, I can execute public/dispatch.fcgi without error. 4. svn co
2010 Nov 28
2
converting xml to a OpenStruct
Hi just wondering if there is a easy way to turn an xml entity into a object like of type OpenStruct where i can access everything like a property? It''s kind of like parsing xml, I already know about nokogiri, but I want to work is a OpenStruct and not a DOM object, does that make sense? =P -- Kind Regards, Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely GNU/Linux:
2010 Nov 10
2
[Cucumber]Which example fails??
I have the following test: Feature: Test the login for all roles In order to login As user I need to provide my password and username Scenario Outline: Test login for role Given user should exist with email: "test-g0R8lVqzWK4@public.gmane.org", name: "tester" And the user with email: "test-g0R8lVqzWK4@public.gmane.org" is a
2010 Jan 31
3
Append/Prepend to a template from controller method
I want a method in app/controllers/application.rb that can prepend/append text to whatever template gets rendered. Of course I can''t call render twice w/o getting a double render error, so is this possible? I want to redirect after a delay using a meta refresh. Here''s what I''ve got: app/controllers/application_controller.rb: def redirect_after_delay (url, delay)
2009 Dec 23
8
Where did this value in a form come from?
Newb here. I have a form and a value that is being displayed ... and I have no idea where the value came from. I have done a <%= debugger; '''' %> in the form and, indeed, the debugger stops at the statement. I have tried to trace through the code to see where the value came from ... and I gave up. So ... what in Rails initializes the fields of a form? -- Posted via
2013 Sep 02
2
Why the string interpolation is not working inside the Nokogiri method `#search` ?
Why the string interpolation is not working inside the Nokogiri method `#search` ? require ''nokogiri'' doc = Nokogiri::HTML::Document.parse <<-eotl <div> <p>foo</p> <p>foo</p> <p>bar</p> </div> eotl doc.class # => Nokogiri::HTML::Document class Person attr_accessor :name end ram = Person.new
2009 Jan 24
4
nokogiri selector help
hiya, i want the selector that would return a <tr> of a table if any td contains some text, so i can use it in click_link_within e.g. When I click the "show" link within the row containing "user at example.com" When /^I click the "(.+)" link within the row containing "(.+)"$/ do | link, text| selector = ?? click_link_within selector, link
2009 Dec 23
4
html parser / assertions in a model
I am using http.get in a model to parse html code returned from a Oracle server. My first try was to use assertions (assert and assert_select) to test and parse the html code. But I have problems including the methods in the model. Have tried both "include" and copy/paste to get assertion methods into my model. Works as a model, but I get load errors when I am using the model from a
2009 Jul 19
3
Edit function now outputs HTML only
For some reason my new action works fine but my edit outputs nothing but raw HTML. Anyone have any ideas?
2013 Jun 29
2
how to remove nokogiri warning message
hi I always get this message today WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.0 I googled by all solution is for mac, I am use linux(openSUSE 12.3) any one can help? thanks in advance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop
2013 Jun 04
3
Nokogiri::XML methods example
Hi, I am not able to find out a simple example to find out the how the method works: > Nokogiri::XML::EntityReference::new (http://nokogiri.org/Nokogiri/XML/EntityReference.html#method-c-new) > Nokogiri::XML::Document#canonicalize (http://nokogiri.org/Nokogiri/XML/Document.html#method-i-canonicalize) Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message
2013 Jun 18
2
`require': cannot load such file -- nokogiri (LoadError) in rubyXL
Hi All Getting the below error when running the source code My requirement is : I want read / write the excel sheet ( both xls / xlsx ) from Ruby , if you have any other solution also share with me .. *Source Code :* * * * bash-3.2$ cat rubyXL.rb require ''rubyXL'' workbook = RubyXL::Parser.parse("test.xlsx") workbook = RubyXL::Workbook.new sheet_Name =
2011 Dec 05
12
Using nokogiri
HI, I want to grab some information about university names, and I found this term called "web scraping" I search about it in google, and there are tools in ruby. One of them is nokogiri but I''m a bit confused because it seems that it only gets information that its already in an html or xml I found a webpage that have a list of university names as a <select>