示例#1
0
        // Initalises parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file
        bool ParseXmlFile(string xmlFilename)
        {
            var parser = new CCSAXParser();

            parser.SetDelegator(this);

            return(parser.ParseContentFile(xmlFilename));
        }
示例#2
0
        bool ParseXmlString(string data)
        {
            var parser = new CCSAXParser();

            parser.SetDelegator(this);

            return(parser.ParseContent(data));
        }
示例#3
0
        bool ParseXmlString(string data)
        {
            var parser = new CCSAXParser();

            parser.SetDelegator(this);

            return parser.ParseContent(data);
        }
示例#4
0
		public Dictionary<string, Object> DictionaryWithContentsOfFile(string filename)
        {
            CCSAXParser parser = new CCSAXParser();

            parser.SetDelegator(this);

			parser.ParseContentFile(filename);
            return rootDict;
        }
示例#5
0
        public Dictionary <string, Object> DictionaryWithContentsOfFile(string filename)
        {
            CCSAXParser parser = new CCSAXParser();

            parser.SetDelegator(this);

            parser.ParseContentFile(filename);
            return(rootDict);
        }
示例#6
0
        public CCTileMapInfo(StreamReader stream) : this()
        {
            string data = stream.ReadToEnd();

            var parser = new CCSAXParser();

            parser.SetDelegator(this);

            parser.ParseContent(data);
        }
示例#7
0
		public List<Object> ArrayWithContentsOfFile(string filename)
        {
            CCSAXParser parser = new CCSAXParser();

            parser.SetDelegator(this);

            StartElement(parser, "dict", null);
            StartElement(parser, "key", null);
            TextHandler(parser, System.Text.UTF8Encoding.UTF8.GetBytes("root"), 4);
            EndElement(parser, "key");
            
			parser.ParseContentFile(filename);

            EndElement(parser, "dict");

            return rootDict["root"] as List<Object>;
        }
示例#8
0
        public List <Object> ArrayWithContentsOfFile(string filename)
        {
            CCSAXParser parser = new CCSAXParser();

            parser.SetDelegator(this);

            StartElement(parser, "dict", null);
            StartElement(parser, "key", null);
            TextHandler(parser, System.Text.UTF8Encoding.UTF8.GetBytes("root"), 4);
            EndElement(parser, "key");

            parser.ParseContentFile(filename);

            EndElement(parser, "dict");

            return(rootDict["root"] as List <Object>);
        }
示例#9
0
        // Initalises parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file
        bool ParseXmlFile(string xmlFilename)
        {
            var parser = new CCSAXParser();

            parser.SetDelegator(this);

            return parser.ParseContentFile(xmlFilename);
        }
示例#10
0
        public CCTileMapInfo(StreamReader stream) : this()
        {
            string data = stream.ReadToEnd();

            var parser = new CCSAXParser();

            parser.SetDelegator(this);

            parser.ParseContent(data);
        }