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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



venkatNaga
New User

Aug 22, 2005, 1:24 PM

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

Hi,

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

Script 1 :

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

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


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., myScript.sh <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