Help with string replacement in xml

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.