void Resource::Load(MSXML2::IXMLDOMNodePtr  ini)
{
	CMSD::CResource resource = ini;

	ASSIGN(name ,((std::string) resource.Name[0]).c_str(), L"None");
	ASSIGN(identifier ,((std::string) resource.Identifier[0]).c_str(), L"None");
	ASSIGN(type ,((std::string) resource.ResourceType[0]).c_str(), L"None");
	ASSIGN(description ,((std::string) resource.Description[0]).c_str(), L"None");
	ASSIGN(hourlyRate , resource.HourlyRate[0].Value2[0].GetNode()->text, L"None");
	ASSIGN(hourlyRateUnit ,((std::string) resource.HourlyRate[0].Unit[0]).c_str(), L"None");

	// These are properties
//	capacity = CCMSDIntegrator::GetProperty(ini, bstr_t(L"Capacity"), bstr_t(L"1"));  
//	manufacturer = CCMSDIntegrator::GetProperty(ini, bstr_t(L"Manufacturer"), bstr_t(L"Acme"));  
//	serial_number = CCMSDIntegrator::GetProperty(ini, bstr_t(L"SerialNumber"), bstr_t(L"Acme"));  

	PropertyElement().LoadProperties<CMSD::CResource>(resource, properties);

	for(int i=0; i< resource.Property.count(); i++)
	{

		if( resource.Property[i].Name[0].GetNode()->text == bstr_t("MTBF:Measured"))
		{
			Distribution * astat ( (Distribution *) IObject::CreateSave<Distribution>() );
			astat->LoadProperty(resource.Property[i].GetNode());
			mtbfid= astat->identifier= this->identifier + "MTBF:Measured";
			this->mtbf=astat;
		}
		else if( resource.Property[i].Name[0].GetNode()->text == bstr_t("MTTR:Measured"))
		{
			Distribution * astat ( (Distribution *) IObject::CreateSave<Distribution>() );
			astat->LoadProperty(resource.Property[i].GetNode());
			mttrid= astat->identifier= this->identifier + "MTTR:Measured";
			this->mttr=astat;
		}
	}
}