diff --git a/src/xercesc/com/XMLDOMUtil.cpp b/src/xercesc/com/XMLDOMUtil.cpp
index 2b430adb3ad155faa0eeb948852a33743ee6030f..b3b38faa78c3af6438f7f20ce9bfacbcfbc4bc6e 100644
--- a/src/xercesc/com/XMLDOMUtil.cpp
+++ b/src/xercesc/com/XMLDOMUtil.cpp
@@ -1042,6 +1042,6 @@ void GetXML(const DOM_Node &node, _bstr_t &text)
 {
 	xmlstream stream;
 	stream << node;
-	text.Assign(stream.SysAllocString());
+	text = _bstr_t(stream.SysAllocString(),false);
 }