See first of all you need to create the XML file and then you have to import it in the visual C++ program using the name that you have mentioned. See I would like to give you one best example.
XML file
Code:
<?xml version="1.0"?>
<cars>
<company name="AUDI">
<producer name="ABC">
<model>X6 Convertible</model>
<price currency="usd">60,000</price>
<horsePower>6000</horsePower>
<fuelCapacity units="gallons">13.5</fuelCapacity>
</make>
</company>
<company name="Mercedes">
<make name="benz">
<model>test model</model>
<price currency="usd">30,000</price>
<horsePower>5000</horsePower>
<fuelCapacity units="gallons">15.5</fuelCapacity>
</make>
</company>
</cars>
After creating this files save it. And then load it in the VC++ program, remember that you have to import some related libraries also. Then make a new Visual C++ project called XMLDOMFromVC, and in the In the MFC AppWizard, describe the project as being a dialog-based application.
Code:
BOOL CXMLDOMFromVC::InitInstance()
{
AfxEnableControlContainer();
// .. statements
::AfxOleInit();
//..statements
return FALSE;
}
Bookmarks