already there! except it’s called “createDocument”
I tend to use a macro for debugging XML content at various points to make it easier. Something like this…
#define DBGXML(xml,msg) DBG(msg);\
… then you can just put DBGXML(pXmlElement,T(“some reminder of what you’re testing”)); and it will be filtered out in a release build. [mind you, the DBGs would be filtered out anyway, so you probably don’t need to bother putting it in preprocessor conditionals. I think the one i used was actually a little different, but this is basically the same.
this was from memory though, it might not work out of the tin!