public static ExposedObject Load(XmlNode rootNode, String objectName) { //String objectName = rootNode.Attributes.GetNamedItem("name").Value; String objectTypeName = rootNode.Attributes.GetNamedItem("type").Value; if ( objectTypeName == null) return null; ObjectType objectType = DatabaseSystem.GetObjectType(objectTypeName); if (objectType == null) return null; ExposedObject newObject =new ExposedObject(objectType, objectName); newObject.ReadMembers(rootNode); return newObject; }