perladdict has asked for the wisdom of the Perl Monks concerning the following question:
The XML file which i need to modify based on the above properties file is as below.#Below is the Properties file content M_R_xxxx/nodes/Application = test123 M_R_params/nodes/Environment = test M_R_Params/Debug/log = /admin/test/xxxx/yyyy/at/domain/test123-uat/app +lication/logs/a.log M_R_/nodes/srv/new/build/binding/machine = tesing.com M_A_/app/ser/ada/bind/bin/host = google.com M_R_/ap/ser/mn/bin/bin/product/ver = 1.2.3 M_R_/app/serv/SN/bind/bin/set/perl/size = 566 M_A_/appl/ser/CN/bind/bin/set/perl/Path = /xxxx/APP/app1/alter/value M_A_/appn/ser/XT/bind/bin/set/perl/Path = /new/test/app/minor/test123 M_R_/applx/serx/NT/bind/binding/down/time = 30 M_R_/appl/serv/PT/context/test/no = 25 M_R_/appl/ser/XT/gate/clear/state = false
From long time i am going through the threads which are related to XML in Perl monks,based on posts in perl monks i have installed XML::Parser,XML::libXML, based on the examples in the thread i could able to parse the XML but not able to achieve the task what actually its needed to accomplish this task.I have started to read the O'REILLY Perl and XML PDF book which i have downloaded from Net, but this may take time for me to gain some knowledge on this.Experts monks could you please consider this post and consider it's an humble and very kind request from me to give your valuable inputs for me to get start with this task.<?xml version="1.0" encoding="UTF-8"?> <list> <entry> <name><first>Thadeus</first><last>Wrigley</last></name> <phone>716-505-9910</phone> <address> <street>105 Marsupial Court</street> <city>Fairport</city><state>NY</state><zip>14450</zip> </address> </entry> <entry> <name><first>Jill</first><last>Baxter</last></name> <address> <street>818 S. Rengstorff Avenue</street> <zip>94040</zip> <city>Mountainview</city><state>CA</state> </address> <phone>217-302-5455</phone> </entry> <entry> <name><last>Riccardo</last> <first>Preston</first></name> <address> <street>707 Foobah Drive</street> <city>Mudhut</city><state>OR</state><zip>32777</zip> </address> <phone>111-222-333</phone></entry> <entry> <address> <street>10 Jiminy Lane</street> <city>Scrapheep</city><state>PA</state><zip>99001</zip> </address> <name><first>Benn</first><last>Salter</last></name> <phone>611-328-7578</phone> </entry> </list>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to replace the existing values and to add the new nodes which are not existed based on the properties file
by choroba (Cardinal) on Apr 01, 2014 at 21:25 UTC | |
by perladdict (Chaplain) on Apr 02, 2014 at 11:41 UTC |