similar to: Re: Re: XML to Database via ActiveRecord

Displaying 20 results from an estimated 5000 matches similar to: "Re: Re: XML to Database via ActiveRecord"

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 Aug 30
1
xml - get values
Hi I have the following xml string that I have loaded into an REXML object as shown below. #xml stuff for saveRoute require ''rexml/document'' include REXML Xml = "<test> <name>sam</name> <description>this is a test</description> <description>this is a test2</description> </test>" XmlObject = Document.new(Xml)
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:&quot;Sometext&quot;;}]]> > > 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
2010 Mar 26
2
How to read a xml file?
How to read a xml file? I have this XML source: ------------------------------------------------------- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <fichas> <ficha> <nombre>Gabriel</nombre> <apellido>Molina</apellido> <direccion>Alfredo Vargas #36</direccion> </ficha>
2006 Jan 13
1
Send XML Document with SOAP
Hello, yes it''s another ruby-nuby question but i cant find the right docs so I hope either someone has an answer or can provide links to what i havent been able to find. I am trying to call a wsdl web service running on .net server with a ruby client. I can make the request and with a wiredump I see the SOAP request and responce XML files, the files are correct but I am not sure
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 Dec 21
1
Princely - Prince XML PDF Wrapper Plugin
Recently I was implementing PDF generation for a project utilizing the fantastic library Prince XML (http://www.princexml.com). I came across a blog article with a basic library and helper set for Prince (http:// sublog.subimage.com/articles/2007/05/29/html-css-to-pdf-using-ruby-on- rails), which provided a great basis. I wanted to make something a little more generalized and in-keeping the Rails
2006 Jul 24
0
parsing xml from post
I am working on an application where the client sends an xml string. I was planning on using REXML and reading the raw post data. Then I noticed that if the content type is text/xml, rails parses the xml into the params hash. However, it chokes on attributes in the xml such as the xml below, throwing an error that it can''t typecast the attribute value in line 99 of cgi_methods.rb
2009 Mar 16
0
Reading XML-file + saving to sqlite3 database
Hi! I''m new with Ruby On Rails, so I don''t really know how I can get this fixed. As a result of a program, I''ve got +/- 20 XML files, and I would like to import them to my sqlite3 database. Each XML-file having it''s own table. Now I think I need to read the xml-files first and process them later. I''ve done some research and found REXML, but I
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 May 30
11
Display XML file, with some formatting.
Hi. Im quite new to this Rails thing, but it seems like a good product so why not try it out whit a little prototype i need to build. What i want is to load any given XML file, and display it with some formatting. I have some XSD shemes to validate the XML files against, but its not vital rigth now. But how should i approach this task? At first it would proberly be a good idea to load the
2006 Apr 17
5
XML-RPC Webservice API
Hi, After following the excellent tutorials in the Agile Web Development with Rails book, I was able to get my webservice working pretty much perfectly :) I can access it via SOAP and XML-RPC and look at service.wsdl to find the API. What I can''t do however is get the API for the XML-RPC call. It fails with : Internal protocol error: NilClass is not a valid input stream. It must
2006 Mar 02
2
Use ActiveRecord outside of Rails to upload to database?
Sorry if this has been asked in the past, but the search function is still down... My scenario: For my research agency, I''m trying to download XML files from the National Weather Service (NWS) and import certain data into my SQL Server database. Normally, I would use .NET to do this, but I''m trying to find a Ruby solution. Question: Suppose I write a Ruby script to run
2006 Aug 05
1
XML from Builder without the to_s element
Hi All, I''m trying to return XML from a Rails view of an object I built up using Builder::XmlMarkup and I find an annoying side effect is that I get an extra <to_xml/> or <to_s/> element back which makes REXML hiccup thinking I''m adding a recond root element when I try to parse the return. How can I return the XML without this last element? Thanks, Vince
2006 Apr 10
1
Substruct e-commerce platform 0.61 RELEASE
After some thought and discussion, and some bugfixing I now present you with Substruct v0.61 Let me know how you all take the changes. show_by_tags is greatly improved, now allowing for friendly urls. Version 0.61 --------------------------------------- Updated: - New routes.rb file - you need to copy this into your config directory! This supports the new store show_by_tags with multiple
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
2006 May 29
1
Substruct 0.7 now here!!!
I''ve just pushed the latest version of Substruct, everyone''s favorite CMS/E-commerce project out the door. http://dev.subimage.com/projects/substruct/ is the home page if you''re unfamiliar with it. The release is available here: http://subimage.com/files/substruct-0.7.tar.gz And install instructions here:
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 ***********
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
2007 Apr 03
3
Mongrels dying on FreeBSD 5.5-STABLE......why why why?
Yo Zed and everyone else, I''m having a major problem I''m hoping someone can help with. I''ve been running mongrel clusters for a few months with no problems on a couple of my boxes. They both run Debian... I recently moved one of my older Rails apps on a FreeBSD 5.5 box to mongrel as well. Everything runs quickly and wonderfully - when it''s running! My problem