Hi Dear Monks,
I am very new to the XML data manipulation using Perl, some process will generate the iprocess XML, in which few values are not populated correctly, Due to this client are editing this xml manually by using the properties file. I need to automate this task by using the Perl. I don't have any prior experience for this task.Below is the detail description of task which i need to complete.The input for editing the XML is properties file, in which the lines starts with M_R signifies replacement of the values for those attributes which are existed in XML and M_A are the lines for which i need to add new nodes in the XML. Below it the properties file content and the XML which i need to modify based on the properties file.
#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
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
The XML file which i need to modify based on the above properties file is as below.
<?xml version="1.0" encoding="UTF-8"?>
<street>105 Marsupial Court</street>
<street>818 S. Rengstorff Avenue</street>
<street>707 Foobah Drive</street>
<street>10 Jiminy Lane</street>
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.