How to edit xml file?

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

With any available text editor.

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

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

<http://www.xml.com/pub/a/2005/11/09/rexml-processing-xml-in-ruby.html&gt;

See if that doesn't get you started :slight_smile:

FWIW,