Displaying 20 results from an estimated 600 matches similar to: "screenscraping using htmltools and rexml"
2006 Jan 10
1
OT: Scraper library recommendation
Hi all,
this is quite off-topic, but I''m sure a lot of people here has experience
in the area, so...
I''m writing a website scraper script that needs to download a web page,
traverse the (X)HTML tree and finally insert data and HTML pieces into
a DB. Eventually this data will be served up as RSS and/or Atom.
I''m currently using html/tree (htmltools); I''ve also
2006 May 16
0
htmltools 1.09 doesn''t play nice with ActionPack strip_tags!
All,
I''ve discovered an incompatibility between HTMLTools 1.09 (a very handy
HTML parser) and ActionPack 1.12.1.
Basically, they both do some HTML parsing and they both create a module
named HTML::Tag, which causes confusion when said Tag object attempts to
be instantiated in the ActionPack context.
That said, now I get to choose which one''s namespace to fiddle with.
But a
2007 Jun 07
1
Undefined method `register'' for REXML::Encoding:Module
Has anyone seen the below error before?
It appears to only occur when Puppet runs automatically (i.e. a "puppetd
--test" doesn''t cause it). I have recently installed new Ruby rpms on
the server and I''m guessing that I may have left out something when I
built the RPMS (based on FC7 SRPM).
> -----Original Message-----
> From: report@melrhweb1.nmh-au
2007 Sep 29
2
REXML - XML query only returning one (last) result
I''m really new to Ruby on Rails, and I''m trying to read an XML file
with REXML. No matter what I try, I am only getting the last result
returned from my query. I should be getting 365 results. Here is the
code:
include REXML
require ''rexml/document''
require ''rexml/xpath''
class MakeFootprintController < ApplicationController
def index
2009 Feb 02
12
[RSpec] rcov and/or rexml bug?
Hi,
Running: Ruby 1.8.7 p72, RSpec 1.1.12 and rcov 0.8.1.2.0, I get the
following error message with $ rake spec:rcov
--
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:in
`[]'': no implicit conversion from nil to integer (TypeError)
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:in
`wrap''
from
2006 Jan 08
2
ICONV and REXML
Hi all. I''m having trouble getting REXML to play nicely with an RSS feed
that uses an encoding type called WINDOWS-1250.
My application works when I comment out the references to the lines that
utilize the REXML library.
After visiting my app and being told that Rails could not start properly, my
server.log file says:
FastCGI: comm with server
2006 Jun 26
0
DBI question. How do I load a database with data parsed from REXML?
I wrote a rexml script that parses rather big xml files (DOM parsing) and
builds an object out of them. This is what it looks like after i parse the
xml file and display the object:
[#<Article:0xb79e7428 @brand="This is a story from ", @id=5337,
@fblurb="burb", @ntype="news type here", @copy="Copyright \302\251 2006 ",
@source="source",
2007 Apr 23
0
backgroundrb and REXML issue
Hi,
I have an application that receives XML files, and then hands each one
off to a backgroundrb worker to parse and store the info. Everything
was working, until I needed to support a larger character set. So I
added the following to the top of my XML files: <?xml version="1.0"
encoding="ISO-8859-1"?>
Adding this worked fine when I tested it without using
2007 Jun 07
0
Why does REXML run significantly slower in Rails
We have some code that uses REXML, that when executed outside of Rails as a
standalone rb file, runs fine. Once we run the code inside of Rails, it is
dog slow. I know REXML is slow, buggy, sucks, etc., but my question is what
cause the performance to degrade like that. Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2009 Oct 13
0
Re: How can I parse encoded and serialized XML with REXML?
On Sep 24, 2:14 pm, Andy <andym...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I''ve getting data like this:
>
> <![CDATA[a:1:{i:0;s:6:"Sometext";}]]>
>
> I know in PHP I can unserialize and decode, but I''m not sure the best
> way to do it in Rails.
>
> I''m already parsing the XML using REXML so I''m
2008 Jan 02
3
REXML::Comment:Class
I have this field in my app where a logged in user can enter a comment,
but when I click on the link bringing me to that page I get the
following error message:
undefined method `table_name'' for REXML::Comment:Class
I am doing some encrypting that has an ''include REXML'' statement but
when I comment that out I still get this error. Does anyone know where
this is coming
2006 May 18
1
Unnecessary Gem modules loaded under Rails 1.1.2
All,
Rails 1.1.2
Win XP Pro
Rubyful Soup 1.0.4
htmltools 1.0.9
I am terribly confused as to what pulling in a gem does with respect to
how many modules get loaded at runtime.
I am using two gems in my app, Rubyful Soup and htmltools.
RubyfulSoup requires one module from the htmltools gem
(html/sgml-parser).
My app requires the RubyfulSoup gem.
When I started my app, something was causing
2006 Jun 24
1
Parsing XML with REXML problem
Why can it not find my object? What am i missing here? Here is my code:
require ''rexml/document''
include REXML
# classes to represent the objects and relationships in the xml file
class Article
attr_accessor :id, :post, :archive, :ntype, :head, :blurb, :body,
:fblurb, :fimage, :att, :source, :copy, :brand
end
# the base parser
class BaseXMLParser
def initialize(filename)
2004 Aug 20
1
Any plans to switch wxruby-swig to using rexml?
since http://nqxml.sourceforge.net/
also recommends that we switch to use rexml which is shipped with ruby?
If there are plans for it but no developers, I might take it up as an
exercise to learn the internals of wxruby-swig.
Cheers,
Phuah Yee Keat
2007 Jul 14
1
Very basic question about REXML
Hello Everybody,
I have pretty basic question abut REXML. I want to put the String "John doe" in titles array, if attribute name is equal to "93". Please see the code below. I could not find how to do it.. any help would be very appriciated.
Here is the XML i am trying to parse
<entrydata columnnumber="2" name="93">
<text>John
2007 Feb 07
2
Quick XPath question (REXML)
All,
If I have the following (assume that xml contains a valid REXML Document
and that the root of the xml is way above any <tr> elements in the
document):
just_rows = xml.elements["//tr[starts_with(@id,
''xdgDataRow_grid_container_'')]"]
shouldn''t just_rows contain _all_ of the <tr> elements whose id
attributes start_with
2006 Jun 28
0
REXML StreamListener
Anyone ever use the REXML StreamListener in any of their rails projects
before? I m trying to set it up in one of my controllers but Im cofused
as to where Im supposed to set up the Handler class.
thanks for the help!
-Sergio
--
Posted via http://www.ruby-forum.com/.
2010 Jan 22
0
REXML::ParseException: Missing end tag for 'META' (got "HEAD
Hi,
I am using flickr_fu gem. When I try to get photos with following
flickr = Flickr.new(File.join(RAILS_ROOT, ''config'', ''flickr.yml''))
flickr.photos.search(:user_id => user_id)
it gives me error like
"REXML::ParseException: Missing end tag for ''META'' (got "HEAD")"
I have checked the presence of flickr.yml file &
2009 Oct 13
0
Re: How can I parse encoded and serialized XML with REXML?
Not really a solution, but this has to be a classic example of PHP-
programmer-bass-ackwardness. They''re already writing to an extensible
serialization format (XML) but then just whack language-specific
serialized data in instead. That''s right up there with the HTTP-over-
SOAP-over-HTTP stuff I''ve seen floating around...
--Matt Jones
On Sep 24, 9:14 am, Andy
2010 Nov 08
0
Re: REXML UTF-16 trouble
Was this ever solved? How do I load a UTF-16 xml file into REXML?
Thanks!
Naren
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to