most simple xml library

R

rubyist101

I'm looking for a simple and easy to use xml creator/parser
library for Ruby.
My program doesn't need all bells&whistles offered by
complex libraries, rather a way to manage structured data
and transfer it in a portable fashion among different
hardware architectures.

Basically, I need these functions:

1. Create a xml structure.
2. Add/delete an item to/from the structure.
3. Assign a value to a given item.
4. Move an item/substructure from a structure to a
different one (or to a different level of the same structure)
5. Parse the structure (find an item by name or by value, etc).


Any suggestions greatly appreciated.
Thanks in advance.
 
S

Sean Russell

....
Any java/ruby programmers out there know how this lib compares to the
fantastic java lib called "jdom" (http://www.jdom.org/)?

It doesn't, except that the APIs both suck less than DOM. REXML
predates jdom, but jdom is very similar to ElectricXML (which was the
inspiration for REXML). REXML hasn't looked like ElectricXML for a
long time, by the way, so the "E" in REXML is the only connection it
has to ElectricXML.

A less catty answer would be: they're similar in that they both try to
stay out of the way of the programmer, and they have similar APIs.
They diverge in large parts because REXML leans heavily on certain
Rubisms (associative arrays, Procs) and uses Ruby naming conventions.

I'd guess that there are only so many ways you can minimize an XML
tree API while maintaining full functionality to all XML concepts.
Because of the naming conventions of the XML spec, methods in
simplified APIs tend to look similar, and toolkits tend to act the
same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,137
Messages
2,570,797
Members
47,342
Latest member
eixataze

Latest Threads

Top