iXMLDoc->save ERROR 
Author Message
 iXMLDoc->save ERROR

Hi,

The follows lines doesn't work on example.cpp code
-----
      // SAVE DOES NOT WORK
      _variant_t varString = _T("\\example.xml");
      hr = iXMLDoc->save(varString);
----
whats wrong with may code?

TIA
Edgard Lima

// example.cpp

#include "stdafx.h"

#include <objsafe.h>
namespace MSXML
{
    #include <msxml.h>

Quote:
}

#include <ocidl.h>

#include <comdef.h>

int example()
{

     MSXML::IXMLDOMDocument  *iXMLDoc     = NULL;

     HRESULT    hr;
     VARIANT_BOOL   vSuccess;

     hr = CoInitializeEx(NULL,COINIT_MULTITHREADED);

     hr = CoCreateInstance (MSXML::CLSID_DOMDocument, NULL,
     CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
     MSXML::IID_IXMLDOMDocument,(LPVOID *)&iXMLDoc);

     iXMLDoc->put_async(VARIANT_FALSE);

     hr = iXMLDoc->loadXML( L"<customer><first_name>Joe</first_name>"
        L"<last_name>Smith</last_name></customer>",
       &vSuccess);

      // SAVE DOES NOT WORK
      _variant_t varString = _T("\\example.xml");
      hr = iXMLDoc->save(varString);

     return 0;

Quote:
}



Sat, 05 Jun 2004 01:31:12 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Why this bitwise error (>>>)

2. >> Error with linked list

3. CArchive >> not defined error

4. B>C>C++>VC++(MFC)>RAW API PROGRAMMING>ATL>COM>OLE>ADO>ASP.............

5. >>>>>>>>> What would you like in a debugger?

6. CFileDialog , suggesting a name for a file before saving, -->EXCEPTION

7. Simulate File->Save via message map?

8. how to use <save as>

9. <<<<<<<Parsing help, please>>>>>>>>

10. C->->->->C++

11. >>>> PUBLICATION QUALITY SOFTWARE MANUAL

12. File Format conversion, ascii freeform -->.csv <-->.wk1<-->dbf<-->?HELP

 

 
Powered by phpBB® Forum Software