public bool parseXMLFile(string xmlFilename)
        {
            CCSAXParser cCSAXParser = new CCSAXParser();

            if (!cCSAXParser.init("UTF-8"))
            {
                return(false);
            }
            cCSAXParser.setDelegator(this);
            return(cCSAXParser.parse(xmlFilename));
        }
Exemple #2
0
        public Dictionary <string, object> dictionaryWithContentsOfFile(string pFileName)
        {
            CCSAXParser cCSAXParser = new CCSAXParser();

            if (!cCSAXParser.init("UTF-8"))
            {
                return(null);
            }
            cCSAXParser.setDelegator(this);
            cCSAXParser.parse(pFileName);
            return(this.m_pRootDict);
        }
        public Dictionary<string, Object> dictionaryWithContentsOfFile(string pFileName)
        {
            CCSAXParser parser = new CCSAXParser();

            if (false == parser.init("UTF-8"))
            {
                return null;
            }
            parser.setDelegator(this);

            parser.parse(pFileName);
            return m_pRootDict;
        }
        /// <summary>
        /// initalises parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file
        /// </summary>
        public bool parseXMLFile(string xmlFilename)
        {
            CCSAXParser parser = new CCSAXParser();

            if (false == parser.init("UTF-8"))
            {
                return false;
            }

            parser.setDelegator(this);

            return parser.parse(xmlFilename); ;
        }