Find change in XML and print node
Your code is somewhat simplistic in that all it is doing is ensuring that the same id values appear in each document. XML is a lot more complicated than that, though, and you may have problems when:


you have multiple entries with the same id
you have entries without an id
the content in entries with the same ID in different documents is wildly different.


In terms of the algorithm, the code is clear, and so on. The string_hasher logic concerns me a bit simply because I am not that familiar with C++ (I am more familiar with XML)..... but, I have the following concerns there:


Why return int for the hash? It is specified to return size_t.
why have the struct at all?


If you convert the const char* ID to be a std::string then you can just make it a map of std::string and use the default values for the hashing and equalities in the template.

Funally, as a small optimization, you can probably save half your memory if you us a 'subtraction' type algorithm for comparing the document structures. Consider )note, I always use braces for code blocks, even if they have just one line):

for (auto&amp; node: doca.child("site_entries").children("entry")) {
    mapa[node.child_value("id")] = node;
}


Then, in the next loop, do the following instead:

for (auto&amp; node: docb.child("site_entries").children("entry")) {
    const char* nid = node.child_value("id");
    if (!mapa.erase(nid)) {
        mapb[nid] = node;
    }
}


Now, at this point, there is no need to perform an intersection on the maps... the values in mapa we know ae not in mapb, and visa versa. You can just print the contents of the two maps without any further processing... 

Putting all these suggestions together, your code would look something like:

int main() {
    pugi::xml_document doca, docb;
    std::map&lt;string, pugi::xml_node&gt; mapa, mapb;

    if (!doca.load_file("a.xml") || !docb.load_file("b.xml"))
        return 1;

    for (auto&amp; node: doca.child("site_entries").children("entry")) {
        const char* id = node.child_value("id");
        mapa[new std::string(id, strlen(id))] = node;
    }

    for (auto&amp; node: docb.child("site_entries").children("entry"))
        const char* idcs = node.child_value("id");
        std::string id = new std::string(idcs, strlen(idcs));
        if (!mapa.erase(id)) {
            mapb[id] = node;
        }
    }

    for (auto&amp; ea: mapa) {
        std::cout &lt;&lt; "Removed:" &lt;&lt; std::endl;
        ea.second.print(std::cout);
    }

    for (auto&amp; eb: mapb) {
        std::cout &lt;&lt; "Added:" &lt;&lt; std::endl;
        eb.second.print(std::cout);
    }

}