CIS*2750: Functions for Creating Valid GPXdocs - IT Assignment Help

Download Solution Order New Solution
Assignment Task:

Task:

Assignment 2 will consist of three modules:
1. Functions for creating valid GPXdocs, validating GPXdocs, and writing them to a file
2. Functions for computing / retrieving various useful properties of GPXdocs
3. A set of "glue" functions to convert a GPXdoc and its components into JSON strings. These functions will be useful in later assignments: they will help us integrate the C library created in in A1/A2 with the server-side JavaScript code in A3/A4.
You are provided with a temporary header file for A2 Module 1 (GPXParser_A2temp.h). This header will be updated when Modules 2 and 3 come out. Once Module 3 is released, I will post the final official header file for Assignment 2, which will be used in the A2 test harness for grading.

Module 1 functionality

GPXdoc* createValidGPXdoc(char* fileName, char* gpxSchemaFile);
An updated version of createGPXdoc. The only difference is that this function validates the xmlDoc returned by the libxml2 function xmlReadFile against an XSD file that represents the GPX standard before doing any further parsing and building the GPXdoc. This will allow your code assume that the libxml tree contains valid GPX data when you are traversing that tree.

This function does the parsing and allocates a GPXdoc It accepts the name of the GPX file, and the name of the XSD file. If the file contains a valid GPX file and has been parsed successfully, a pointer to the to the newly created GPXdoc object is returned. If the parsing fails for any reason - invalid XML format, invalid GPX format, etc. - the function must return NULL.
bool writeGPXdoc(GPXdoc* doc, char* fileName); This function takes an GPXdoc struct and saves it to a file in GPX format. Its arguments are a GPXdoc and the name of a new file. It must return true is the write was successful, and false is the write failed for any reason - invalid arguments, invalid output file name, etc.. This function can assume that the doc argument has already been validated with validateGPXDoc, which is discussed below. It must still make sure the arguments are not NULL.

 

This CIS*2750: IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment Experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.