# Xml-simp

**URL:** <https://www.ruby-forum.com/t/xml-simp/164383>\
**Category:** Ruby\
**Created:** [March 31, 2009, 6:24pm UTC](https://www.ruby-forum.com/t/xml-simp/164383 "2009-03-31T18:24:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vetrivel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/dc4da7/32.png) [@vetrivel](https://www.ruby-forum.com/u/vetrivel)\
**Post date:** [March 31, 2009, 6:24pm UTC](https://www.ruby-forum.com/t/xml-simp/164383/1 "2009-03-31T18:24:28Z")

</div>

I have dowunloaded the xml-simple-1.0.12.gem .

I used xml-simple to requie .  
require ‘xml-simple’ But it doesn’t work

Then I have given like this It works,  
require ‘xmlsimple’

My question is that,

How do i know it should be xmlsimple. But the gem file is  
xml-simple-1.0.12.gem

---

<div class="post-metadata">

**Author:** ![vetrivel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/dc4da7/32.png) [@vetrivel](https://www.ruby-forum.com/u/vetrivel)\
**Post date:** [March 31, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/xml-simp/164383/2 "2009-03-31T20:08:35Z")

</div>

Vetrivel V. wrote:

> I have dowunloaded the xml-simple-1.0.12.gem .
> 
> I used xml-simple to requie .  
> require ‘xml-simple’ But it doesn’t work
> 
> Then I have given like this It works,  
> require ‘xmlsimple’
> 
> My question is that,
> 
> How do i know it should be xmlsimple. But the gem file is  
> xml-simple-1.0.12.gem

What happens when you run this command:

$ gem list --local

---

<div class="post-metadata">

**Author:** ![vetrivel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/dc4da7/32.png) [@vetrivel](https://www.ruby-forum.com/u/vetrivel)\
**Post date:** [March 31, 2009, 10:56pm UTC](https://www.ruby-forum.com/t/xml-simp/164383/3 "2009-03-31T22:56:14Z")

</div>

Vetrivel V. wrote:

> I have dowunloaded the xml-simple-1.0.12.gem .
> 
> I used xml-simple to requie .  
> require ‘xml-simple’ But it doesn’t work
> 
> Then I have given like this It works,  
> require ‘xmlsimple’
> 
> My question is that,
> 
> How do i know it should be xmlsimple.

In summary, you don’t. Read the documentation/examples, or look at what  
files the gem contains and make an educated guess as to the one which  
you should require.

---

<div class="post-metadata">

**Author:** ![vetrivel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/dc4da7/32.png) [@vetrivel](https://www.ruby-forum.com/u/vetrivel)\
**Post date:** [April 1, 2009, 2:50pm UTC](https://www.ruby-forum.com/t/xml-simp/164383/4 "2009-04-01T14:50:50Z")

</div>

On Mar 31, 4:55 pm, Brian C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > How do i know it should be xmlsimple.
> 
> In summary, you don’t. Read the documentation/examples, or look at what  
> files the gem contains and make an educated guess as to the one which  
> you should require.

This seems to be one area (of many) where Perl’s CPAN is superior. The  
naming is consistent. The package xml-simple-x.xx will contain the  
module XML::Simple. This will physically exist in the file XML/  
Simple.pm. In your code you know to ‘use XML::Simple;’

Of course, with Perl’s austere naming conventions, you tend not to get  
colorful package names like Cucumber, for better or worse. (Though I  
just noticed a perl port of it with the module name Test::Cucumber  
[Test-Cucumber-0.001 - Perl extension for "Natural Language" test development - metacpan.org](http://search.cpan.org/dist/Test-Cucumber-0.001/))

– Mark.
