All,
所有人,
this is my code
这是我的代码
//declare string pointer
BSTR markup;
//initialize markup to some well formed XML <-
//declare and initialize XML Document
MSXML2::IXMLDOMDocument2Ptr pXMLDoc;
HRESULT hr;
hr = pXMLDoc.CreateInstance(__uuidof(MSXML2::DOMDocument40));
pXMLDoc->async = VARIANT_FALSE;
pXMLDoc->validateOnParse = VARIANT_TRUE;
pXMLDoc->preserveWhiteSpace = VARIANT_TRUE;
//load markup into XML document
vtBoolResult = pXMLDoc->loadXML(markup);
//do some changes to the XML file<-
//get back string from XML doc
markup = pXMLDoc->Getxml(); //<-- this retrieves RUBBISH
//decl