#include "headers.h" ISkinElement *SkinCreateObjectFromXml(HXML hXml, ISkinDataSource *ds) { CSkinObject *result = NULL; const TCHAR *name = xi.getName(hXml); if (!lstrcmp(name, _T("image"))) result = new CSkinImage; else if (!lstrcmp(name, _T("icon"))) result = new CSkinIcon; else if (!lstrcmp(name, _T("text"))) result = new CSkinText; else if (!lstrcmp(name, _T("layout"))) result = new CSkinLayout; else return NULL; result->SetDataSource(ds); result->LoadFromXml(hXml); return result; }