Question: Using Pythons ElementTree XML API, write a Python program to perform the following tasks below. Note that your programs execution syntax must be as follows:

Using Pythons ElementTree XML API, write a Python program to perform the following tasks below.

Note that your programs execution syntax must be as follows:

python xmlparse.py plant_catalog.xml plantName percentChange

1. Using ElementTree, read in this assignments XML file plant_catalog.xml specified by a command line parameter as shown above.

2. Find the plant by the name passed in as an argument on the command line (plantName above).

3. Once found, read the current price and adjust it by the command line argument percentChange. Note that this value could be anything in the range of -90 < percentChange < 100.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!