public void Read(XmlNode root)
            {
                source = (string)root.Attributes["source"].Value;

                foreach (XmlNode node in root.ChildNodes)
                {
                    if (node.Name.Equals("bind_shape_matrix"))
                    {
                        string[] data = node.InnerText.Trim().Replace("\n", " ").Split(' ');
                        mat.M11 = float.Parse(data[0]); mat.M12 = float.Parse(data[1]); mat.M13 = float.Parse(data[2]); mat.M14 = float.Parse(data[3]);
                        mat.M21 = float.Parse(data[4]); mat.M22 = float.Parse(data[5]); mat.M23 = float.Parse(data[6]); mat.M24 = float.Parse(data[7]);
                        mat.M31 = float.Parse(data[8]); mat.M32 = float.Parse(data[9]); mat.M33 = float.Parse(data[10]); mat.M34 = float.Parse(data[11]);
                        mat.M41 = float.Parse(data[12]); mat.M42 = float.Parse(data[13]); mat.M43 = float.Parse(data[14]); mat.M44 = float.Parse(data[15]);
                    }
                    if (node.Name.Equals("source"))
                    {
                        ColladaSource source = new ColladaSource();
                        source.Read(node);
                        sources.Add(source);
                    }
                    if (node.Name.Equals("joints"))
                    {
                        joints.Read(node);
                    }
                    if (node.Name.Equals("vertex_weights"))
                    {
                        weights.Read(node);
                    }
                }
            }
 public void Read(XmlNode root)
 {
     foreach (XmlNode node in root.ChildNodes)
     {
         if (node.Name.Equals("source"))
         {
             ColladaSource source = new ColladaSource();
             source.Read(node);
             sources.Add(source);
         }
         if (node.Name.Equals("vertices"))
         {
             vertices.Read(node);
         }
         if (node.Name.Equals("triangles"))
         {
             ColladaPolygons source = new ColladaPolygons();
             source.type = ColladaPrimitiveType.triangles;
             source.Read(node);
             polygons.Add(source);
         }
         if (node.Name.Equals("polylist"))
         {
             ColladaPolygons source = new ColladaPolygons();
             source.type = ColladaPrimitiveType.polylist;
             source.Read(node);
             polygons.Add(source);
         }
     }
 }