similar to: Search large XML file -- REXML slower than a slug, regex instantaneous

Displaying 20 results from an estimated 2000 matches similar to: "Search large XML file -- REXML slower than a slug, regex instantaneous"

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 Dec 08
3
invalid pointer in libxml xmlFreeNodeList
Hi, Not sure if there is a better place to post this. The libxml-ruby mailing list doesn''t have much activity. We are getting occasional errors on our production box, that I can''t duplicate in testing. It''s not even reproducible on the production box with the same inputs, but I''ve managed to track down (via a lot of print statements into the Apache
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?
2006 Mar 24
4
Parsing Filemaker 6 XML into something I can use
Hi One of our customers has a Filemaker database which needs to be accessed for some data. Using the Web Companion, I can query the database for an XML version of the data. I need to be able to push this data into an array of hashes, so I can access it in a more convenient way. Filemaker is able to provide me with 2 XML formats (DSO-XML and FMP-XML): *********** DSO-XML ***********
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:
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
2006 Feb 01
4
REXML::ParseException - but the feed IS valid
I am using Ruby feedparser and when I try to parse this feed: http://feeds.feedburner.com/Mobilecrunch I get an error: REXML::ParseException: Declarations can only occur in the doctype declaration. This feed does validate at feedvalidator.org. Any idea why it would raise an exception? Thanks, eduard -------------- next part -------------- An HTML attachment was scrubbed... URL:
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
2008 Oct 15
5
REXML vs libxml
Hi all, I''ve been looking at the performance of my fb app and one glaring issue seems to be with the parsing speed of rexml in processing the results. Has anyone looked into porting the facebooker parser from rexml to libxml? If not, any reason I shouldn''t try? Thanks! Yu-Shan. -------------- next part -------------- An HTML attachment was scrubbed... URL:
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
2009 Aug 14
9
Rescuing from REXML::ParseException
Hello, When I call an action with some invalid XML or JSON data a parse exception gets raised from within Rails/Ruby (REXML or ActiveSupport::JSON). The problem that I''ve got is how to handle these exceptions. In my application_controller.rb I have the following for debugging purposes: def rescue_action_in_public(exception) respond_to do |request| request.all { render :text =>
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
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
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)
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 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
2010 Feb 07
4
Optimizing ActiveSupport with native code
I''ve had this idea kicking around in my head for a while, and had some time yesterday to start playing around with it: ActiveSupport is heavily used in both the Rails library code and in the application layer of a typical Rails stack. Certain parts of AS would be much more efficiently implemented in C rather than Ruby; that optimization could potentially have some noticeable, positive
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
2011 Jan 03
8
Heroku, needs constant AppController updates?
Dear All, Fairly new to rails and Heroku, so could be doing something wacky - do let me know if you think my code practice is off, even if unrelated to this error, I''d like to learn! I''m using Rails 3.0.0, ruby 1.8.7, and ''sqlite3-ruby'', ''1.2.5'', :require => ''sqlite3''. I''ve got an application that goes off and