Arun Kumar wrote:
> Peter Zotov wrote:
>> Quoting "Arun Kumar" <arunkumar / innovaturelabs.com>:
>>
>>> Hi,
>>> Is there any way in Ruby to parse an xml file without using REXML or any
>>> other libraries.
>> Of course. You can write a finite state machine, read XML from file
>> and parse as you want.
> 
> Thanks. Can u please give me details of it.

He told you to write a parser. That's the same as using REXML or any other library.

Why can't you use a library? REXML comes for free with Ruby, and is good enough 
in a pinch.

If the XML input is very stable, and it never changes, you can parse some of it 
with Regexp. That will break very easily, but it might be good enough for your 
needs.