Exemple #1
0
bool ArchiveFilter::Save(const TCHAR* lpFileName)
{
	DeleteFile(lpFileName);

	TiXmlDocument doc;

	TiXmlElement* root = new TiXmlElement("filters");

	for (unsigned int i = 0; i < m_pFilters.count(); i++)
	{
		ArchiveFilterEntry* pAE = m_pFilters[i];
		TiXmlElement* tpl = new TiXmlElement("filter");

		pAE->ToXml(*tpl);

		root->LinkEndChild(tpl);
	}

	doc.LinkEndChild(root);
	doc.SaveFile((FakeUtf8String)lpFileName);

	return true;
}