| 92 | // ---------------------------------------------------------------------------------------- |
| 93 | |
| 94 | int main(int argc, char** argv) |
| 95 | { |
| 96 | try |
| 97 | { |
| 98 | // Check if the user entered an argument to this application. |
| 99 | if (argc != 2) |
| 100 | { |
| 101 | cout << "Please enter an xml file to parse on the command line" << endl; |
| 102 | return 1; |
| 103 | } |
| 104 | |
| 105 | doc_handler dh; |
| 106 | // Now run the parser and tell it to call our doc_handler for each of the parsing |
| 107 | // events. |
| 108 | parse_xml(argv[1], dh); |
| 109 | } |
| 110 | catch (std::exception& e) |
| 111 | { |
| 112 | cout << e.what() << endl; |
| 113 | } |
| 114 | } |
| 115 | |