| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #include "StdAfx.h"
- #include "AppXmlInfo.h"
- #include "markup.h"
- CAppXmlInfo::CAppXmlInfo(CString strFile)
- {
- CMarkup xml;
- xml.Load(strFile);
- xml.FindElem(); // root ORDER element
- xml.IntoElem(); // inside ORDER
- if ( xml.FindElem(_T("download_server")) )
- {
- xml.IntoElem();
- while(xml.FindElem(_T("url")))
- {
- CString url = xml.GetData();
- this->download_servers.Add(url);
- }
- xml.OutOfElem();
- }
- if ( xml.FindElem(_T("download_files")) )
- {
- xml.IntoElem();
- while(xml.FindElem(_T("zipfile")))
- {
- CZipFileInfo info;
- info.fileName = xml.GetData();
- info.lastUpdateTime = xml.GetAttrib(_T("lastupdatetime"));
- info.hash = xml.GetAttrib(_T("hash"));
- info.updateMode = xml.GetAttrib(_T("updatemode"));
- this->download_files.Add(info);
- }
- xml.OutOfElem();
- }
- if ( xml.FindElem(_T("startup")) )
- {
- xml.IntoElem();
- while(xml.FindElem(_T("app")))
- {
- CRunExeInfo info;
- info.appname = xml.GetData();
- info.mode = xml.GetAttrib(_T("wait"));
- this->run_apps.Add(info);
- }
- xml.OutOfElem();
- }
- }
- CAppXmlInfo::~CAppXmlInfo(void)
- {
- }
|