cpp: xerces: Add writeDocument methods