|
I am trying to write a script which append and edit the pre-exist xml file, I have got the config.ini file where user can update the changes they want in xml file, and what my script suppose to do is following task, - read the ID and SOURCE from config file into hash - open the XML file and search for the matching ID - compare the source if they are same or different - if different implement the changes the problem I am facing is the structure of my config file is bit complex, as following, [RESOURCE] Id="res.wacgen" Source="INTERNAL"> ($ENV{wacgen} ? $ENV{wacgen} : $ENV{APPL}) Id="res.wacgenlib" Source="INTERNAL"> ($ENV{wacgenlib} ? $ENV{wacgenlib} : $ENV{APPL}.$slash.'all.4gs') Id="res.waclibext" Source="INTERNAL"> ($ENV{waclibext} ? $ENV{waclibext} : '4gs') [UNX] Id="res.dvm.wa" Source="INTERNAL">$(res.fgldir)/bin/$(res.fglrun) Id="res.fgldir" Source="INTERNAL">$ENV{FGLDIR} Id="res.path" [SERVICE_APPLICATION_EXECUTION_COMPONENT] Id="APPL" >$(res.appl) Id="DBCENTURY" >$(res.dbcentury) Id="DBDATE" >$(res.dbdate)
So, I am not looking forward for any suggestion How I can implement this into code? I found perl module XPATH but as I am naïve I couldn’t think of how can I work it out. Any suggestion welcome!!!
Regards
|