Input:
Single text file, no formatting present, blank lines suppressed. Variable length entities.Output:
Hierarchical XML file with sensibly named tags.Platform:
Should be capable of compiling and running on (1)
MS Windows (MSVC++) and (2)
Linux/BSD/OSX (GCC) without changes to the source.Language:
C or C++Resources:
libxml2 (http://xmlsoft.org/)Your task is to employ either the freely downloadable MS Visual C++ 2008 Express Edition (for Windows) or GCC (for unix-like operating systems) in conjunction with the free Gnome XML C Parser Toolkit (libxml2) to produce a sensibly and properly structured XML file from the input file enclosed. The data file is an extract from a flat text print output from a customer's statement run. An annotated printout of the file is attached depicting what the various sections of the file indicate, and would make sensible names for XML tags. We employ a variety of operating systems, so demonstrate the use of portable code where appropriate and use pre-processor instructions to switch to alternative functions on different platforms if necessary. It is not necessary for you to develop and test the code on both platforms, however if you choose to use an OS-dependent library, you need to demonstrate you've researched the alternative for the other main platform and provide the preprocessor code to switch between the methods. The structure of the produced XML file should be flexible enough to accommodate reasonable variations in the input file (for example, multi-page documents, very long addresses) and the code produced should be legible, maintainable and upgradable. The program should return an identifiable error code on encountering a problem, and inform the operator via standard error. If successful, the program should complete silently. Please return submissions including the source, the input, the output and any additional libraries used. |
:D
. I think I should let the company know that I no longer wish to proceed :D
.:-)
:-)