logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Create a basic XML document using a text editor and process it using Python commands.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

I have attached the assignment instructions along with the rubric. Please make sure all the requirements on the rubric are met.

 

Instructions:

This is an individual exercise that will be submitted directly to the instructor using the assignment link provided on Blackboard.  It is okay to ask for and help others with clarifications using the discussion board on Blackboard.  Your final submission file should consist of a single zipped folder containing two Python (.py) files, one each for XML and JSON, and any flat files (e.g., .xml) that you need for your program to work.

Assignment Objectives:

Create a basic XML document using a text editor and process it using Python commands.

Retrieve a JSON document using an API and process it using Python commands.

Option: flip the objectives above – create a basic JSON document using a text editor and retrieve an XML document using an API prior to processing each using Python.

Assignment: 

XML

A. Select a current project or hobby that is of interest to you, and create an XML file describing a related recurring document or event.  Some examples may include restaurant menus, media libraries, concert performances, or a basic project/task management list.

1. Check your XML syntax at http://www.w3schools.com/xml/xml_validator.asp.

2. Using Python’s xml libraries, load your XML from a file or a string variable.  Use a loop in combination with xml library functions to display a list of items from your XML file.

JSON

B. Choose a JSON API and query it using Python.  Several examples are provided in the text, one of which (Google Maps) doesn’t work unless you register for a key or use a workaround (there is a .py file on py4e.com that works). It is ok to use one of these (or other online) examples, on the conditions that you (1) cite your source (URL is ok), and (2) modify the code in a meaningful way, and include code comments specifying what you modified.

1. Allow the user to enter one or more values to send to the API.  

2. Use Python’s json libraries to load the API results and display relevant data from the results.  

 

OPTION:  You may swap the file/string and API options such that you use an API to get XML and a file or string to load JSON, rather than the other way around as specified above.

 

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

995 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

927 Answers

Hire Me
expert
Husnain SaeedComputer science

569 Answers

Hire Me
expert
Atharva PatilComputer science

675 Answers

Hire Me