String is being assumed as bool in writeXML
sdstring document::writeXML(const sdstring &rootElem, bool bPretty, bool bTabs, PREWRITEPTR preWriter) <--- should be calling this
sdstring document::writeXML(bool bPretty, bool bTabs, PREWRITEPTR preWriter) <-- Calls this instead
dDoc.writeXML("random string", true);