private ImageProfile CreateProfile(XmlElement element)
{
XmlElement elem = (XmlElement)element.SelectSingleNode("*");
if (elem.Name == "imageProfile")
return CreateImageProfile(elem);
else if (elem.Name == "colorProfile")
return CreateColorProfile(elem);
throw new NotSupportedException(elem.Name);
}