Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: metafiles Pin
Christian Graus14-Jun-05 14:27
protectorChristian Graus14-Jun-05 14:27 
GeneralRe: metafiles Pin
bkphat15-Jun-05 3:07
bkphat15-Jun-05 3:07 
GeneralRe: metafiles Pin
Christian Graus15-Jun-05 13:08
protectorChristian Graus15-Jun-05 13:08 
Generalconsole to mfc again.. Pin
Assariah kingsly14-Jun-05 8:39
Assariah kingsly14-Jun-05 8:39 
GeneralRe: console to mfc again.. Pin
David Crow14-Jun-05 11:05
David Crow14-Jun-05 11:05 
GeneralRe: console to mfc again.. Pin
Assariah kingsly15-Jun-05 0:58
Assariah kingsly15-Jun-05 0:58 
GeneralRe: console to mfc again.. Pin
David Crow15-Jun-05 3:06
David Crow15-Jun-05 3:06 
GeneralRe: console to mfc again.. Pin
Assariah kingsly15-Jun-05 6:08
Assariah kingsly15-Jun-05 6:08 
GeneralRe: console to mfc again.. Pin
David Crow15-Jun-05 6:14
David Crow15-Jun-05 6:14 
GeneralRe: console to mfc again.. Pin
Assariah kingsly15-Jun-05 6:22
Assariah kingsly15-Jun-05 6:22 
GeneralRe: console to mfc again.. Pin
David Crow15-Jun-05 7:41
David Crow15-Jun-05 7:41 
Generalsearch engine Pin
gamitech14-Jun-05 8:26
gamitech14-Jun-05 8:26 
GeneralRe: search engine Pin
David Crow14-Jun-05 8:31
David Crow14-Jun-05 8:31 
GeneralXML namespace problem i think Pin
LCI14-Jun-05 3:40
LCI14-Jun-05 3:40 
GeneralRe: XML namespace problem i think Pin
Michael Dunn14-Jun-05 4:17
sitebuilderMichael Dunn14-Jun-05 4:17 
GeneralRe: XML namespace problem i think Pin
LCI14-Jun-05 7:24
LCI14-Jun-05 7:24 
GeneralRe: XML namespace problem i think Pin
Tom Archer14-Jun-05 7:34
Tom Archer14-Jun-05 7:34 
GeneralRe: XML namespace problem i think Pin
LCI14-Jun-05 7:41
LCI14-Jun-05 7:41 
GeneralRe: XML namespace problem i think Pin
Tom Archer14-Jun-05 8:25
Tom Archer14-Jun-05 8:25 
GeneralRe: XML namespace problem i think Pin
Tom Archer14-Jun-05 8:31
Tom Archer14-Jun-05 8:31 
GeneralRe: XML namespace problem i think Pin
LCI14-Jun-05 8:51
LCI14-Jun-05 8:51 
GeneralRe: XML namespace problem i think Pin
Tom Archer14-Jun-05 10:37
Tom Archer14-Jun-05 10:37 
GeneralRe: XML namespace problem i think Pin
LCI14-Jun-05 10:56
LCI14-Jun-05 10:56 
That is very cool...
Thanks for showing me that.

I am now able to continue development but have another question. Just attempting a simple task of trying to write


ThisForm

to an XML file. I wrote the code below, but am stuck at the appendChild line and the line after. Do i really need an IXMLDOMNodePtr?? How would i do it without?

MSXML2::IXMLDOMDocumentPtr pIXMLDOMDocument;
MSXML2::IXMLDOMProcessingInstruction *pIXMLDOMProcessing =NULL;
MSXML2::IXMLDOMNodePtr pNode;
MSXML2::IXMLDOMNode *pNode1 = NULL;
MSXML2::IXMLDOMElementPtr pIXMLDOMElement;



//Put some checks to create directory if not there
_variant_t varString = "C:\\XML\\myXML.xml";
// Initialize pIXMLDOMDocument (create a DOMDocument).
hr = CoInitialize(NULL);
hr = pIXMLDOMDocument.CreateInstance("Msxml2.DOMDocument.4.0");

// Load document.
if (pIXMLDOMDocument->load(varString)!= VARIANT_TRUE)
{
// trace(ERROR,"Error loading XML file");
}
//Populate the xml document
//Create elements
pIXMLDOMElement = pIXMLDOMDocument->createElement(BSTR(L"Form"));
hr = pNode->put_text (BSTR(L"ThisForm"));
if (SUCCEEDED(hr))
{
// Create a processing instruction element.
pIXMLDOMProcessing = pIXMLDOMDocument->createProcessingInstruction(BSTR (L"xml"), BSTR(L"version=\"1.0\""));
pNode = pIXMLDOMDocument->appendChild(pNode1);
pIXMLDOMDocument->putref_documentElement(pIXMLDOMElement);

}

//Save DOM to a file
hr = pIXMLDOMDocument->save(varString);
GeneralRe: XML namespace problem i think Pin
Tom Archer14-Jun-05 11:20
Tom Archer14-Jun-05 11:20 
GeneralRe: XML namespace problem i think Pin
LCI14-Jun-05 11:30
LCI14-Jun-05 11:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.