1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Rep Power

    Parse XML and update the values between the tags

    Hi Perl programming team,

    I am working on the XML parsing and I have the XML as

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">


    <name>ABC Server multi-module project</name>
    <description>The root POM for project.</description>

    <!-- <module>cripts</module>
    <module>webapp</module> -->
    <!-- <module>def-webapp</module> -->




    in the above XML i need to update the values between
    version tag which comes under the <parent> and the other comes under <project> but the issue is that the we have many version tags in <project> and I am unable to understand how to sort this issue with programming.

    to be precise i only need to replace the values between the version tag which are
    <version>9.7</version> and

  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Rep Power
    You could use an XML module such as XML::Twig and regular expressions (substitution).
    Free MP3 Dance Music Downloads

    To err is human; To really balls things up you need Microsoft!

IMN logo majestic logo threadwatch logo seochat tools logo