/// <summary>
    /// Parse frames
    /// </summary>
    /// <param name="nodeFrames"></param>
    /// <returns></returns>
    private bool ParseFramesData(XmlNode nodeFrames)
    {
        if (null == nodeFrames)
            return false;

        XmlNodeList nodeList = nodeFrames.NextSibling.SelectNodes("key");
        foreach (XmlNode n in nodeList)
        {
            GTSpriteAtlasCocos2DFrame newFrame = new GTSpriteAtlasCocos2DFrame();
            newFrame.Parse(n.NextSibling, mMetadata);

            int lastIndex = n.InnerText.LastIndexOf('.');
            string frameName = (lastIndex >= 0) ? n.InnerText.Substring(0, lastIndex) : n.InnerText;
            newFrame.name = frameName;
            mFrames.Add(newFrame);
        }

        return true;
    }
    /// <summary>
    /// Parse frames
    /// </summary>
    /// <param name="nodeFrames"></param>
    /// <returns></returns>
    static private bool ParseFramesData(XmlNode nodeFrames, ref GTSpriteAtlasCocos2D spriteAtlas)
    {
        if (null == nodeFrames)
            return false;

        // Query all frames
        XmlNodeList nodeList = nodeFrames.NextSibling.SelectNodes("key");
        if (nodeList.Count == 0)
            return false;

        spriteAtlas.mFrames = new GTSpriteAtlasCocos2DFrame[nodeList.Count];
        if (null == spriteAtlas.mFrames)
            return false;

        // Parse each frame node
        for (int index = 0; index < nodeList.Count; index++)
        {
            XmlNode n = nodeList[index];
            GTSpriteAtlasCocos2DFrame newFrame = new GTSpriteAtlasCocos2DFrame();
            // Parse metadata
            newFrame.Parse(n.NextSibling, ref spriteAtlas.mMetadata);
            // Remove ".png" from frame name
            int lastIndex = n.InnerText.LastIndexOf('.');
            string frameName = (lastIndex >= 0) ? n.InnerText.Substring(0, lastIndex) : n.InnerText;
            newFrame.name = frameName;
            // Add the frame into the array
            spriteAtlas.mFrames[index] = newFrame;
        }

        return true;
    }