School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,360 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,715 people online right now. Registration is fast and FREE... Join Now!




update XML file

 

update XML file, How ro read config.ini to update xml fiel

Sun751

17 Jun, 2009 - 05:59 PM
Post #1

D.I.C Head
**

Joined: 11 Dec, 2008
Posts: 57



Thanked: 1 times
My Contributions
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


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 07:49PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month