#include #include #include #include "rapidxml-1.13/rapidxml.hpp" #include "rapidxml-1.13/rapidxml_print.hpp" #include "rapidxml-1.13/rapidxml_utils.hpp" #define DEBUG using namespace std; void getClipboardText(string& pasteBin) { HANDLE clip; #ifdef DEBUG cout << "Current clipboard: " << pasteBin << endl; #endif if (OpenClipboard(NULL)) { clip = GetClipboardData(CF_TEXT); pasteBin = (char*)clip; CloseClipboard(); #ifdef DEBUG cout << "New clipboard: " << pasteBin << endl; #endif } } void getTextToParse(string& pasteBin) { bool accecpted {false}; while (!accecpted) { getClipboardText(pasteBin); cout << "Your current clipboard is:\n" << pasteBin << endl; cout << "Is this the text you would like to parse? (y/n)" << endl; char resp; cin >> resp; if (resp == 'y') accecpted = true; } } int main() { cout << "Hello Word!\n"; string parseText; getTextToParse(parseText); // { // using namespace rapidxml; // xml_document<> doc; // doc.parse(currentClip) // } }