Hi here's my task an below is most of the code already done. Thanks for any guidance:
Develop the program further so that it finds and extracts specified items from the xmlstring using start and end tags. Now we find and extract and display first the location information and then the temperature information. Location can be found between the tags <location> and </location>. The temperature is between the tags <temp_c> and </temp_c>.
To make it easy to find whatever information from the, xml-string write a function that takes the xml-string and the "inner" text (same for start tag and end tag) of the tags as parameters and returns the text from between the start tag and end tags. If either start or end tag is not found the function must return "not found". Note that when you search for the tag you must search for the whole tag (including angle brackets) not just the tag name that was given as parameter.
For example, if you wanted to find the location
location = find_field(page, "location");
and to get the temperature you could call it as follows:
temperature = find_field(page, "temp_c");
MY CODE: sorry the code format tool is not working for me