프로그래밍/VC++

XML 저장하기

panpro 2007. 6. 27. 14:36

 // 이제 XML을 저장한다.
 CString strFinalXML = xml.GetXML();
 CString strFilename;
 strFilename.Format("%s_%04d.dkp", CBaseInform::getInstance()->m_strProjectFolder + "\\" +
  (CString)m_SelectedProgramItem.pgg_id, m_SelectedProgramItem.pgm_num);

 CStdioFile file;
 file.Open(_T(strFilename), CFile::modeCreate | CFile::modeWrite);
 file.WriteString("<?xml version=\"1.0\" encoding=\"euc-kr\"?>");
 file.WriteString(strFinalXML);