Displaying 20 results from an estimated 600 matches similar to: "XML file using Nokogiri gem"
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
2009 Oct 13
9
Nokogiri: to_s WITHOUT html surrounding's tags?
Hi all
n = Nokogiri::HTML("<h1>H1</h1>")
n.to_s
# => <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><h1>H1</h1></body></html>
Is there a method that only outputs the stuff I''ve read, and not the
whole valid XHTML stuff?
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 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 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
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
2009 Sep 16
2
Active Merchant Error
Hello friends,
I m using Active Merchant(version = 1.4.2) gem.
in billing calculator i m require ''active_merchant'' and when i m open
the page it is throw error such
"no such file to load -- active_merchant".
Can you guyz tell me how can i resolve this problem ...
Waiting for every possible answer
--
Posted via http://www.ruby-forum.com/.
2009 Aug 28
2
Authorize.net CIM(Customer Information Manager)
Hi all,
Please help me out for authorize.net CIM(customer information manager)
implementation.
thanks
--
Posted via http://www.ruby-forum.com/.
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>
2011 Feb 20
7
Using Nokogiri to insert a <span> tag into existing text
All,
I''m using Nokogiri to handle the following problem:
I have a piece of HTML, and for certain text nodes, I need to insert
<span> tags into the text of these nodes at a certain place.
What I am doing is finding the place where I want to insert the <span>,
let''s say index X of the text node''s text, and doing the following:
1) Setting the node''s
2011 Nov 27
2
problem scraping using nokogiri - getting wrong characters
Hi all,
I am scraping a table off of another site and inserting it onto my
site. you can see an example on the initial page at: http://mthosts.heroku.com.
I''m referring to the green box with the snowbird weather and snowfall
information.
this box has been scraped off of the snowbird site at:
http://www.snowbird.com/ski_board/snowreport.php
The problem is that on the snowbird site it
2009 Jun 14
3
Rails I18n
Hi,
I am trying to use i18n in rails. I want the language to be set first
from params[:locale] (probably already in the url) then from the browser
http header and lastly from the default_locale. Everything is fine. Now
the problem starts, when I want to add a dropdown list to allow the user
to change the locale. How do I force the page to reload with the new
Locale? FYI, I tried using .js and
2010 Sep 13
10
Could not find [GEM] locally or in a repository
Hey Guys,
How could I fix the following:
"gem install --no-rdoc --no-ri kete-feedzirra"
ERROR: could not find gem kete-feedzirra locally or in a repository
"gem install --no-rdoc --no-ri libxml-ruby"
ERROR: could not find gem libxml-ruby locally or in a repository
"gem install --no-rdoc --no-ri http_url_validation_improved"
ERROR: could not find gem
2010 Jun 10
0
strange problem:no such file to load -- nokogiri on rails3
I am test the script named test.rb by command "ruby test.rb" and it
pass.
Then i converte it as rake task.
The rake task pass on rails 2.3.4 but fail on rails 3 beta4 with error
msg:
"no such file to load -- nokogiri"
============================
env :rails 3 beta4, ruby 1.8.7, ubuntu
============================
test.rb
============================
require
2010 Oct 31
0
Loading xml document using Nokogiri and retrieving CDATA element
This is an extension of my last post (problems with REXML) which has me
looking to Nokogiri again. The reason I am not using Nokogiri is I can not
seem to find a way to get CDATA out of a Nokogiri document.
First, can you tell me if I am loading my document correctly, because when I
call my_document.to_xml, I only get one line back:
(rdb:1) test_file = Nokogiri::XML(mismo_xml_file)
2010 Feb 06
4
500 Internal Error
I have on ubuntu a digital library application Kete which gives in the
log/production.log:
Please help, thnx.
/!\ FAILSAFE /!\ Fri Feb 05 19:05:08 +0200 2010
Status: 500 Internal Server Error
No connection to server (localhost:11211 DEAD (Errno::ECONNREFUSED:
Connection refused - connect(2)), will retry at Fri Feb 05 19:05:38
+0200 2010)
2009 Jan 19
3
Attachment_fu: save to a default format
Hi, would anyone have any advices on the next?
I allow users to upload images to my app. I''m using attachment_fu and
MiniMagick.
There''s two things that I''d like to do:
1- No matter what format the original file is I''d like to save it in jgp
format.
2- I want to keep all images limited to say 1000px width, so resize if
they are bigger.
Is there a way to do
2014 Jun 30
2
recording in mp3
Hey guys
Is it possible to record with mixmonitor straight into mp3.
I am trying to reduce disk space and want my calls to be recorded in mp3 Instead of wav.
Sent from Samsung Mobile
<div>-------- Original message --------</div><div>From: Sameer Rathod <sameer at hostnsoft.com> </div><div>Date:30/06/2014 9:23 PM (GMT+02:00) </div><div>To: