August 2003
Intermediate to advanced
624 pages
15h 3m
English
Setting up the COM environment is nearly the same as discussed for XMLToCSVBasic.cpp in Chapter 2. There are two differences in the setup, followed by the calls to create the root Element and append it to the Document.
// Set up DOM XML environment (dependent on implementation) // Create the Output XML Document (dependent on // implementation) // Create the COM DOM Document hResult = spDocOutput.CreateInstance( __uuidof(DOMDocument40)); if FAILED(hResult) { throw cCreateInstanceError; } // Create the header processing instruction // and append it to the Document Node spPIHeader = spDocOutput->createProcessingInstruction("xml", cHeaderText); spDocOutput->appendChild(spPIHeader); // Root Element ... |