Edit hibernate config file

I'd like to use a shell script to edit the params in my hibernate.cfg.xml file.
I need to substitute the database info(user name, password,url)

Here is a look at it:

<hibernate-configuration>
 <session-factory name="">
  <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
  <property name="hibernate.connection.password">password</property>
  
<property name="hibernate.connection.url">jdbc:mysql://server.company.com:3306/brokerage</property>
  <property name="hibernate.connection.username">user</property>
  <property name="hibernate.current_session_context_class">thread</property>
  <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
  <property name="hibernate.ignorecheck">true</property>
  <property name="hibernate.lib">hibernate3.jar</property>
  <property name="hibernate.name">Hibernate core</property>
  <property name="hibernate.version">3.0</property>
  <property name="hibernate.when">runtime, required</property>
  <property name="hibernate.jdbc.batch_size">20</property>
  <property name="hibernate.cache.use_second_level_cache">false</property>
  <mapping resource="mybeans/Position.hbm.xml"/>
  <mapping resource="mybeans/SecuMaster.hbm.xml"/>
  <mapping resource="mybeans/Trx.hbm.xml"/>
  <mapping resource="mybeans/FinancialAccount.hbm.xml"/>
 </session-factory>
</hibernate-configuration>

I'm new to unix, what should I use or how to approach?

A sed script along these lines should do the trick:

sed '
        /hibernate.connection.password/s/>.*</>newpassword</
        /hibernate.connection.url/s/>.*</>http:\/\/newurl:3306\/brokerage</
        /hibernate.connection.username/s/>.*</>newuser</
' originalfile > modifiedfile

Basically it replaces anything between > and < with the new value on the matching line.