CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Need a perl script which does the following....


New User

Aug 22, 2005, 1:24 PM

Post #1 of 1 (1434 views)
Need a perl script which does the following.... Can't Post


I need the perl scripts for the following cases....

Script 1 :

I have with me an xml file in following format....

<product id="001" name="aaa" title="This is a sample product" ack="true">
<product id="002" name="bbb" title="nothing" ack="false" >

the script must add the attribute mod="Y" to all the products for which ack="true" in the xml.
Also must add the dirName="<....>" for each product.

1. The attribute mod="Y" or "N" depending on the ack="true" or ack="false".

2. The attribute dirName="<directoryName>" for each product.

I will be running the shell script on a directory to generate the above xml file.
ex., <dirName> ==> will give me the above xml file.

That directory name which I give as an input must go as the "dirName" attribute.

After adding the two attibutes the script must generate the same xml file with the newly added
attribute to each product.

Appreciate your replies..


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives