This program converts a CD catalog from XML format to an HTML table format
- g++ compiler
- RapidXML library
-
Clone the Repository (or download the source code):
git clone https://github.com/MujahidElmaki/XMLToHTMLConverter.git
-
Navigate to the Project Directory:
cd XMLToHTMLConverter
-
Compile the Program: Run the
make
command to compile the executable -
Run the Executable: After compiling you may run the program with:
./XMLToHTMLConverter cd_catalog.xml
-
Clean up: You can clean the executable after running it with
make clean
This will generate an HTML file from the given XML file, inside the XMLToHTMLConverter folder
- Reads XML CD catalog files
- Converts the XML to an HTML table format
- Handles basic XML structures
- RapidXML Library: Chosen for its performance and ease of use for parsing XML files, currently the go to for this use case.
- Stringstream (from sstream library): Incorporated for constructing the HTML content dynamically. The
stringstream
class offers a convenient and efficient way to concatenate strings and build the HTML structure. It simplifies the process of generating HTML by allowing for incremental additions to the HTML content, ensuring readability and maintainability of the code
- Abstraction for Simplicity: The program code is all contained in the main function, this was to keep things simple and readable. If this were code that would be pushed to production, I would think about separating the code into different files & classes. As well as making the implementation abstract to work with all XML files