Forum: Ruby on Rails How to edit xml file?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
dare r. (Guest)
on 2009-01-23 07:45
Dear all,

I have an xml server settings file and iam in process of editing the xml
server settings file. could anyone suggest me how to edit the xml file.

My xml file.

<server>
   <filepath>/home/user/pictures</filepath>
   <port>192.168.0.111</port>
</server>

I need to edit the above xml file with new port value. Please suggest
how to edit the existing xml file.

Thanks in advance

Regards,
Jose Martin
Hassan S. (Guest)
on 2009-01-23 08:01
(Received via mailing list)
On Thu, Jan 22, 2009 at 9:45 PM, dare ruby
<removed_email_address@domain.invalid> wrote:

> I need to edit the above xml file with new port value. Please suggest
> how to edit the existing xml file.

With any available text editor.

--
Hassan S. ------------------------ removed_email_address@domain.invalid
dare r. (Guest)
on 2009-01-23 08:05
Thanks Hassan

> With any available text editor.

but i need to edit using ruby code.

Please suggest on how to edit using ruby code?


Thanks in advance

Regards,
Jose Martin
Hassan S. (Guest)
on 2009-01-23 18:02
(Received via mailing list)
On Thu, Jan 22, 2009 at 10:05 PM, dare ruby
<removed_email_address@domain.invalid> wrote:

> Please suggest on how to edit using ruby code?

This is a short intro to working with XML in Ruby:

<http://www.xml.com/pub/a/2005/11/09/rexml-processi...

See if that doesn't get you started :-)

FWIW,
--
Hassan S. ------------------------ removed_email_address@domain.invalid
This topic is locked and can not be replied to.