I'm using pugixml's xpath functions to find certain nodes within a html document (downloaded through curl).
I am using:
pugi::xml_document doc;
doc.load_buffer(htmlcontent.c_str(), htmlcontent.size());
pugi::xpath_node example= doc.select_single_node("//h2[@class='tv_header']");
std::cout << example.node();
which returns 0 nodes. I know that this node exists in the document. I've put just that node within a string and it finds the node successfully. Why is the node not found within the document? Is there some issue with encoding of the html document?
Thanks!