-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (24 loc) · 797 Bytes
/
Copy pathmain.cpp
File metadata and controls
29 lines (24 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "xml_reader.h"
int main(int argc, char** argv)
{
// Check parameters
if (argc <= 1)
{
std::cout << "Error: Invalid parameters!" << std::endl;
std::cout << "Usage ./xml_Reader_test_project xmlFile" << std::endl;
std::cout << std::endl;
std::cout << "Parameter description" << std::endl;
std::cout << " configurationFile: Path and filename of xml file" << std::endl;
return 1;
}
// Remove the first parameter
argc--;
// creating file name
const std::string filename(argv[1]);
// creating xml reader object
xml_reader my_xml_reader_obj(filename);
// calling member fucntions of xml reader
my_xml_reader_obj.set_xmlAttributes();
my_xml_reader_obj.print_xmlAttributes();
return 0;
}