Displaying 20 results from an estimated 20000 matches similar to: "Using XmlSimple to parse XML strings"
2006 Feb 04
0
XmlSimple vs XML::Simplel?
Greetings!
I have a bunch (thousands) of XML files that I want to process. I want to extract a limited set of data from each and put that data, along with the XML file''s id, into MySQL so that users can do a structured search for (and thus retrieve) specific XML files.. I''ve got some Perl scripts I put together using XML::Simple to do the extraction of the data into CSV files,
2006 May 17
0
Problem with ''require xmlsimple'' in vendor code
Hi there
I''m trying to "require ''xmlsimple''" in some code that lives in vendor/
I''ve installed the xml-simple gem, and can confirm this at the command line
with ''gem list --local'' which shows I have v.1.0.8 of the gem.
However, when I start up lighttpd I get this:
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
2006 Mar 29
4
xmlsimple not found
I''ve been working through the Flickr tutorial, and it looks like I
installed the Flickr gem with the require xml-simple gem without
problems. But when I got to the point in the demo when it was time to
submit the form, I got an error with the message "uninitialized constant
Flickr".
I did some poking around at the gem repository, and ran ''ruby
2006 Jul 11
1
error when ''Booting WEBrick''
I encountered this problem yesterday so, I decided to build the whole
/app directory over but got the same thing again. what I did- I build
the MVC files for ''abc'', included abc.rb in /lib, appended
environment.rb with ''require abc'' and the service worked fine. And then
I did the same for ''xyz'' and ran the server but it failed. both abc.rb
and
2006 Jul 10
3
WEBrick start problem
Following is the error I get when I run ''\root\ ruby script\server''
The server does not starts.
Any help !?!
------------------------------
=> Booting WEBrick...
c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:275:
warning: already initialized constant KNOWN_OPTIONS
c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:280:
warning: already
2006 Jun 26
0
error while booting WEBrick server
getting the following when trying to run the WEBrick server:
c:\root\ ruby script\server
error msg:
----------------------
=> Booting WEBrick...
c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:275:
warning: already initialized constant KNOWN_OPTIONS
c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:280:
warning: already initialized constant DEF_KEY_ATTRIBUTES
2006 Feb 07
3
Problems with flickr gem: already initialized constant
New to rails so please bear with me. Am having difficulties with the
flickr plugin. trying to follow the video as a starter, and keep hitting
the following problem when I require ''flickr'' in the environment.rb file
testbed:/srv/www/htdocs/carstuff # ruby script/server
=> Booting WEBrick...
/usr/local/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:274:
warning:
2008 Jan 08
1
howto rebuild a object from a received xml hash structure ?
im my web server app , i have an action to be used as a REST web
service
# GET /user/membership.xml?email=emailaddress
def membership
@user = User.find_by_email(params[:email])
respond_to do |format|
format.xml { render :xml => @user.to_xml( :only =>
[ :first_name, :last_name, :display_name, :membership_type, :membership_at], :skip_types
=> true)}
end
end
my
2006 Feb 12
3
Flickr demo screencast
Hi,
I''m new to Ruby and Ruby on Rails. Yesterday I just received the Agile
Web Development with Rails book.
Now I wanted to recreate the Flickr demo screencast
(http://www.rubyonrails.com/screencasts) just for fun to see it live.
But unfortunately when I start my server I get some warnings:
g5:~/ruby/flickr mw$ ruby script/server
=> Booting lighttpd (use ''script/server
2006 Jul 10
7
problem with starting WEBrick
Following is the error I get when I run ''\root\ ruby script\server''
The server does not starts.
Any help !?!
------------------------------
=> Booting WEBrick...
c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:275:
warning: already initialized constant KNOWN_OPTIONS
c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:280:
warning: already
2006 Jan 19
5
RoR still not working on SuSE 9.0 - incomplete headers received
Hi,
I''ve already posted my problem a few weeks ago on several forums, or
lists. I still have the same problem:
I have a SuSE 9.0 machine, Apache 2.x, ruby 1.8.4 I wanna get RoR
working with fastCGI.
I have installed different versions of fastCGI, have checked the
permissions of the fcgi-ipc directory, reinstalled everything and it
still doesn''t work.
In the browser window I
2005 Dec 21
8
Incomplete headers
Hi,
I wanna use Rails on a SuSE server with apache. Everything should be
installed correctly, but when running the application I get this in my
apache log:
FastCGI: comm with server
"/srv/www/htdocs/web4/html/rails/public/dispatch.fcgi" aborted: idle
timeout (60 sec)
FastCGI: incomplete headers (0 bytes) received from server
2006 Feb 13
1
hackish error handling
I''ve got a block of code that''s turning out.. well - just plain ugly.
So i know I must not be doing it the Ruby way.
The main problem I''m having is in dealing with handling errors - and
just not finding much Rails documentation that gives a deeper
understanding of how to handle errors in Rails (outside of several
docs on the catch-all''s)
the main method
2006 May 26
1
GET from remote sites and parsing RESPONSE xml
For example, this url returns some xml:
http://www.mysite.com/xml
What is the correct way to perform a GET on this url, and then parse the
RESPONSE xml?
Could someone shine some light on a poor soul? :)
--
Posted via http://www.ruby-forum.com/.
2010 Mar 07
8
Parsing XML file with no style info with Hpricot
Hello,
I''ve been trying for hours to parse an XML using Hpricot. Usually it''s
not a problem. Here''s my simple code:
#This works and outputs the proper xml data
@url1 = ''http://www.sportingnews.com/stories/sportingnews/MLB/rss.xml''
@page1 = Hpricot(open(@url1))
<%= @page 1 %>
#This does not work, and I''m scratching my head
@url1 =
2012 May 14
1
undefined method `parse' for String:Class
Hi,
I use a script called : add_admin.rake
When i execute this : ''rake -s -f Rakefile mailserv:add_admin --trace
i have this error :
** Invoke mailserv:add_admin (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute mailserv:add_admin
rake aborted!
undefined method `parse'' for String:Class
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
2010 Mar 08
1
to_xml repeating elements and plain strings
Say I want to output XML like this:
<myXML>
<id>123</id>
<fruit>apple</fruit>
<fruit>banana</fruit>
<fruit>pear</fruit>
<fruit>lemon</fruit>
</myXML>
Is there a way of doing that with to_xml?
It seems like there''s two problems: to_xml always creates a wrapping
element <fruits> when it encounters an
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
***********
2013 Oct 21
3
What it exactly do these do ( RubyXL::Parser.parse and Roo::Excelx.new) when opening a file?
Do they open a file and load it into memory?
I''m asking because it seems to take a long time opening a file but after it
opens looping into the variable is REALLY fast, could someone explain me or
tell me where can I find an explanaition on how this sort of things work?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"