# Xml-simp

**URL:** <https://rubytalk.org/t/xml-simp/52596>\
**Category:** ruby-talk\
**Created:** [31 March 2009 16:24 UTC](https://rubytalk.org/t/xml-simp/52596 "2009-03-31T16:24:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vetrivel\_Vaithilinga](https://avatars.discourse-cdn.com/v4/letter/v/958977/32.png) [@Vetrivel\_Vaithilinga](https://rubytalk.org/u/Vetrivel_Vaithilinga)\
**Post date:** [31 March 2009 16:24 UTC](https://rubytalk.org/t/xml-simp/52596/1 "2009-03-31T16:24:14Z")

</div>

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

I used xml-simple to requie .  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;require 'xml-simple' But it doesn't work

Then I have given like this It works,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud](https://avatars.discourse-cdn.com/v4/letter/7/57b2e6/32.png) [@7stud](https://rubytalk.org/u/7stud)\
**Post date:** [31 March 2009 18:08 UTC](https://rubytalk.org/t/xml-simp/52596/2 "2009-03-31T18:08:20Z")

</div>

Vetrivel Vetrivel wrote:

> I have dowunloaded the xml-simple-1.0.12.gem .
> 
> I used xml-simple to requie .  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;require 'xml-simple' But it doesn't work
> 
> Then I have given like this It works,  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Brian\_Candler](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Brian\_Candler](https://rubytalk.org/u/Brian_Candler)\
**Post date:** [31 March 2009 20:55 UTC](https://rubytalk.org/t/xml-simp/52596/3 "2009-03-31T20:55:58Z")

</div>

Vetrivel Vetrivel wrote:

> I have dowunloaded the xml-simple-1.0.12.gem .
> 
> I used xml-simple to requie .  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;require 'xml-simple' But it doesn't work
> 
> Then I have given like this It works,  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Mark\_Thomas](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@Mark\_Thomas](https://rubytalk.org/u/Mark_Thomas)\
**Post date:** [1 April 2009 12:49 UTC](https://rubytalk.org/t/xml-simp/52596/4 "2009-04-01T12:49:41Z")

</div>

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  
[http://search.cpan.org/dist/Test-Cucumber-0.001/\](http://search.cpan.org/dist/Test-Cucumber-0.001/%5C))

-- Mark.

> **···**
>
> On Mar 31, 4:55 pm, Brian Candler \<b.cand...@pobox.com\> wrote:
> 
> > Vetrivel Vetrivel 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.
