All pastes #2055397 Raw Edit

Mine

public text v1 · immutable
#2055397 ·published 2011-05-08 16:54 UTC
rendered paste body
void Student::testXML()
{
	CMarkup xml;

	xml.Load( MCD_T("Student.xml") ); // converts file to a wide string
	xml.FindElem(); // students
	xml.IntoElem(); // go inside the root element
	xml.FindElem( MCD_T("student") ); // student
	xml.IntoElem();
	xml.FindElem( MCD_T("name") ); // name
	wstring name = xml.GetData();

	cout << MCD_2PCSZ(name) << endl; // should be a name but is a location in memory
	// or
	cout << name.c_str() << endl; // should be a name but is a location in memory
}