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.
B736ee289a70ae21e323ed2f808dd0ce?d=identicon&s=25 dare ruby (martin_mercy2001)
on 2009-01-23 06: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
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2009-01-23 07:01
(Received via mailing list)
On Thu, Jan 22, 2009 at 9:45 PM, dare ruby
<rails-mailing-list@andreas-s.net> 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 Schroeder ------------------------ hassan.schroeder@gmail.com
B736ee289a70ae21e323ed2f808dd0ce?d=identicon&s=25 dare ruby (martin_mercy2001)
on 2009-01-23 07: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
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2009-01-23 17:02
(Received via mailing list)
On Thu, Jan 22, 2009 at 10:05 PM, dare ruby
<rails-mailing-list@andreas-s.net> 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 Schroeder ------------------------ hassan.schroeder@gmail.com
This topic is locked and can not be replied to.