//doesn't use the serialization APIs, but just looks at attributes at the top level
 public static List<BounceFileMetaData> RetrieveMetaData()
 {
     //List<string> fullFileList = Directory.GetFiles (saveDirectory, savePrefix + "*" + saveSuffix,
     //                                                SearchOption.TopDirectoryOnly).ToList();
     List<string> fullFileList = Directory.GetFiles (saveDirectory, savePrefix + "*" + saveSuffix).ToList ();
     List<BounceFileMetaData> dataList = new List<BounceFileMetaData> ();
     foreach (string filename in fullFileList)
     {
         reader = XmlReader.Create(filename);
         XmlDocument doc = new XmlDocument();
         doc.Load(reader);
         XmlNodeList nodeLst = doc.ChildNodes;
         foreach (XmlNode node in nodeLst)
         {
             if (node.Name == "PlayerData") {
                 BounceFileMetaData metadata = new BounceFileMetaData();
                 if (node.Attributes["numberDeaths"] != null)
                     metadata.numberDeaths = long.Parse(node.Attributes["numberDeaths"].Value);
                 if (node.Attributes["numberCollectibles"] != null)
                     metadata.numberCollectibles = int.Parse(node.Attributes["numberCollectibles"].Value);
                 if (node.Attributes["playTime"] != null)
                     metadata.numberSeconds = long.Parse(node.Attributes["playTime"].Value);
                 if (node.Attributes["lastCheckpoint"] != null)
                     metadata.lastCheckpoint = int.Parse(node.Attributes["lastCheckpoint"].Value);
                 //Debug.Log (filename);
                 string truncStr = filename.Substring((saveDirectory + savePrefix).Length);
                 //Debug.Log (truncStr);
                 truncStr = truncStr.Substring(0, truncStr.Length - saveSuffix.Length);
                 //Debug.Log (truncStr);
                 metadata.index = int.Parse(truncStr);
                 dataList.Add(metadata);
             }
         }
         reader.Close();
     }
     return dataList;
 }
    // Use this for initialization
    void Start()
    {
        XmlReaderSettings settings = new XmlReaderSettings();
        reader = XmlReader.Create(xmlSourceUrlName, settings);

        XmlDocument doc = new XmlDocument();
        doc.Load(reader);

        if (reader == null)
        {
            reader.Close();
            print("error: file could not be found");
        }

        else
        {
            constructTileSets(doc);
            constructMap(doc);

            EditorApplication.SaveScene(sceneDestinationUrlName, true);
        }
    }