public static Animation Deserialize(XmlNode node)
{
if(node == null)
throw new ArgumentNullException("node");
var animation = new Animation() {
Name = node.Name
};
// Set the properties of the animation
foreach(XmlAttribute attribute in node.Attributes)
animation.Properties.Add(attribute.Name, attribute.Value);
// Add any children (recursively)
if(node.HasChildNodes)
foreach(XmlNode child in node.ChildNodes)
animation.Children.Add(Animation.Deserialize(child));
return animation;
}