# Help with string replacement in xml

**URL:** <https://www.ruby-forum.com/t/help-with-string-replacement-in-xml/119661>\
**Category:** Rails\
**Created:** [November 8, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/help-with-string-replacement-in-xml/119661 "2007-11-08T23:56:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![baztheman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@baztheman](https://www.ruby-forum.com/u/baztheman)\
**Post date:** [November 8, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/help-with-string-replacement-in-xml/119661/1 "2007-11-08T23:56:09Z")

</div>

Hi,

I am a newbie and would like to know how I can change the contents of  
the xml files with Ruby.

In pom.xml,

 com.sports.storage.build.super-pom storeage-pom 1.2.3.4 com.sports.basketball branding foundation-component 2.6.6.7 
1. How can i find parent|groupID|artifactID|version, then change  
“1.2.3.4” to “1.2.3.5”?
2. How can i find dependency|groupId|artifactId|type|version, then  
change “2.6.6.7” to “2.6.6.8”?

Thanks.

B.
