similar to: Re: How can I parse encoded and serialized XML with REXML?

Displaying 20 results from an estimated 2000 matches similar to: "Re: How can I parse encoded and serialized XML with REXML?"

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
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)
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:
2006 Feb 28
0
Ruby Feedparser and exceptions on valid feeds
I am using Ruby Feedparser and keep running into situations when a feed is valid but feedparser throws an exception - REXML::ParseException: Declarations can only occur in the doctype declaration. The following feed does validate at feedvalidator.org (with a warning, but does validate): http://www.engadget.com/rss.xml However, when I run feedparser I get this error: <REXML::ParseException:
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
2018 Nov 08
0
error unserializing ascii format (v2 or v3)
I see this on MacOS as well, so likely not platform dependent. A little more diddling to try to narrow it down: > unserialize(serialize(as.raw(1), NULL, version=2, ascii=TRUE)) [1] 30 > unserialize(serialize(list(as.raw(1)), NULL, version=2, ascii=TRUE)) [[1]] [1] 30 > unserialize(serialize(list(raw=as.raw(1)), NULL, version=2, ascii=TRUE)) Error in unserialize(serialize(list(raw =
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)
2006 Jan 25
0
screenscraping using htmltools and rexml
Hi, I need to do some screen scraping and I''ve spent a couple hour getting htmltools and rexml do the right thing. Here''s the code: parser = HTMLTree::Parser.new(false, false) parser.feed(res.body) tree = parser.tree.html_node.as_rexml_document I works for one page, but for another I get "undefined method `add'' for #<HTMLTree::Element:0x37f9cc8>" in
2005 Aug 22
5
XML "Un-Builder?"
I''ve been unserializing XML in PHP with the XML_Serializer class, and I''m wondering if anyone knows of such a class for Ruby. Nothing fancy, just perhaps a simple way of converting arbitrary XML to a Ruby object. Maybe this has been implemented somewhere already? Thanks, Raymond
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
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
2011 Dec 06
1
unserialize and eager execution
Hi, While debugging a network server I'm developing I noticed something unusual - call to unserialize() resulted in an error about loading a namespace. I was a bit taken back by this - why should unserializing an object cause a namespace lookup? Are there any other side-effects of unserialize() that I should be cautious about? I've been digging through the R_Unserialize() call, I
2018 Nov 07
2
error unserializing ascii format (v2 or v3)
I ran into an interesting error unserializing a file created with ascii=TRUE: R 3.5.1 (Windows or Linux): > unserialize(serialize(list(raw=as.raw(c(39,41))), NULL, version=2, ascii=TRUE)) Error in unserialize(serialize(list(raw = as.raw(c(39, 41))), NULL, version = 2, : ReadItem: unknown type 29, perhaps written by later version of R The same error happens when the
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
2020 Oct 29
0
[External] Something is wrong with the unserialize function
Thanks for the report. Will look into it when I get a chance unless someone else gets there first. A simpler reprex: ## create and serialize a memmory-mapped file object filePath <- "x.dat" con <- file(filePath, "wrb") writeBin(rep(0.0,10),con) close(con) library(simplemmap) x <- mmap(filePath, "double") saveRDS(x, file = "x.Rds") ## in a