Welcome To Snipplr

Everyone's Recent Ruby Snippets Tagged xml

« Prev 1 Next »
I use this code snippet all the time. It allows me to parse a CSV file and transform it into an XML file.
0 43 posted 8 years ago by chrisaiv
IceCast server's sometimes offer meta-data information on a particular piece. Here's an example of a data scrape from Classical KUSC
0 19 posted 9 years ago by chrisaiv
I’ve recently had to parse some pretty large XML documents, and needed a method to read one element at a time. Here’s a fairly simple solution in Ruby form.
0 28 posted 9 years ago by dom111
0 15 posted 10 years ago by sukantahazra
I had an XML file that I needed to convert to CSV. In order to make things easier for myself, I used a pipe | symbol instead of a comma so that there would be no parsing errors later. I also ended up writing the file to a Txt file and importing it...
1 41 posted 10 years ago by chrisaiv
REXML does not seem to have a 'lang' method, which is strange since lang is in the XML 1.0 Specification §2.12 'Language Identification', and in many other libraries. Because of Ruby's 'monkey patching', it's pretty easy to add - you just recursivel...
1 11 posted 11 years ago by tommorris
« Prev 1 Next »