【Cocos2d-x游戏引擎开发笔记(25)】XML解析
【Cocos2d-x游戏引擎开发笔记(25)】XML解析
原创文章,转载请注明出处:http://blog.csdn.net/zhy_cheng/article/details/9128819
XML是一种非常重要的文件格式,由于C++对XML的支持非常完善,cocos2d-x选择XML作为主要的文件存储格式。在cocos2d-x中集成了libxml2来解析XML数据。
定义一个用于解析的类,这个类继承CCSAXDelegator和CCObject,然后实现CCSAXDelegator的纯虚函数。
- #ifndef XMLANALYSIS_H_H
- #define XMLANALYSIS_H_H
- #include "cocos2d.h"
- #include <string>
- using namespace cocos2d;
- using namespace std;
- class XMLAnalysis:public CCSAXDelegator,public CCObject//继承CCSAXDelegator,覆盖纯虚函数
- {
- public:
- XMLAnalysis(const char* data,unsigned int length);//解析数据
- XMLAnalysis(const char* filename); //解析文件
- ~XMLAnalysis(void);
- virtual void startElement(void *ctx, const char *name, const char **atts);//开始标签
- virtual void endElement(void *ctx, const char *name); //标签结束
- virtual void textHandler(void *ctx, const char *s, int len); //标签的内容
- string rootname;
- };
- #endif
#ifndef XMLANALYSIS_H_H
#define XMLANALYSIS_H_H
#include "cocos2d.h"
#include <string>
using namespace cocos2d;
using namespace std;
class XMLAnalysis:public CCSAXDelegator,public CCObject//继承CCSAXDelegator,覆盖纯虚函数
{
public:XMLAnalysis(const char* data,unsigned int length);//解析数据XMLAnalysis(const char* filename); //解析文件~XMLAnalysis(void);virtual void startElement(void *ctx, const char *name, const char **atts);//开始标签virtual void endElement(void *ctx, const char *name); //标签结束virtual void textHandler(void *ctx, const char *s, int len); //标签的内容string rootname;
};
#endif
源文件
- #include "XMLAnalysis.h"
- XMLAnalysis::XMLAnalysis(const char* data,unsigned int length)
- {
- CCSAXParser parser; //定义解析
- if(parser.init("UTF-8")==0) //不是utf-8就不解析了
- {
- CCLog("please use utf-8");
- return;
- }
- parser.setDelegator(this); //设置解析的对象,这样就会调用解析的方法
- parser.parse(data,length);
- }
- XMLAnalysis::XMLAnalysis(const char* filename)
- {
- CCSAXParser parser;
- if(parser.init("UTF-8")==0)
- {
- CCLog("please use utf-8");
- return;
- }
- parser.setDelegator(this);
- parser.parse(filename);
- }
- XMLAnalysis::~XMLAnalysis(void)
- {
- }
- void XMLAnalysis::startElement(void *ctx, const char *name, const char **atts)
- {
- if(strcmp(name,"root"))
- {
- rootname=name;
- }
- }
- void XMLAnalysis::textHandler(void *ctx, const char *s, int len)
- {
- string str=string(s,0,len);
- if(rootname!="")
- {
- CCLog("%s",str.c_str());
- }
- }
- void XMLAnalysis::endElement(void *ctx, const char *name)
- {
- rootname="";
- }
#include "XMLAnalysis.h"XMLAnalysis::XMLAnalysis(const char* data,unsigned int length)
{CCSAXParser parser; //定义解析if(parser.init("UTF-8")==0) //不是utf-8就不解析了{CCLog("please use utf-8");return;}parser.setDelegator(this); //设置解析的对象,这样就会调用解析的方法parser.parse(data,length);
}
XMLAnalysis::XMLAnalysis(const char* filename)
{CCSAXParser parser;if(parser.init("UTF-8")==0){CCLog("please use utf-8");return;}parser.setDelegator(this);parser.parse(filename);
}XMLAnalysis::~XMLAnalysis(void)
{}
void XMLAnalysis::startElement(void *ctx, const char *name, const char **atts)
{if(strcmp(name,"root")){rootname=name;}
}
void XMLAnalysis::textHandler(void *ctx, const char *s, int len)
{string str=string(s,0,len);if(rootname!=""){CCLog("%s",str.c_str()); }
}void XMLAnalysis::endElement(void *ctx, const char *name)
{rootname="";
}
这样每次就打印出标签的内容。
下面使用CURL联网,从网络获取XML来解析,至于CURL联网的配置,请查看我的上一篇文章【Cocos2d-x游戏引擎开发笔记(24)】CURL实现get和post联网。定义一个静态变量std::string str;用于保存网络数据
- static string str;
static string str;
在源文件中:
- std::string HelloWorld::str;
std::string HelloWorld::str;
在按钮的点击事件中,开始联网:
- void HelloWorld::menuCloseCallback(CCObject* pSender)
- {
- str="";
- //usePost();
- useGet();
- XMLAnalysis *p=new XMLAnalysis(str.c_str(),strlen(str.c_str()));//解析数据
- //XMLAnalysis *p=new XMLAnalysis("xmltemp.xml"); //解析文件
- delete p;
- }
void HelloWorld::menuCloseCallback(CCObject* pSender)
{str="";//usePost();useGet();XMLAnalysis *p=new XMLAnalysis(str.c_str(),strlen(str.c_str()));//解析数据//XMLAnalysis *p=new XMLAnalysis("xmltemp.xml"); //解析文件delete p;
}
这里联网是阻塞的,所以调用useGet之后,全部数据获得之后才开始解析的。下面是useGet的实现:
- void HelloWorld::useGet()
- {
- CURL *curl;
- CURLcode res;
- curl=curl_easy_init();
- if(curl)
- {
- curl_easy_setopt(curl,CURLOPT_URL,"http://dota.uuu9.com/rss.xml");
- curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,writehtml);
- res=curl_easy_perform(curl);
- if(res!=CURLE_OK)
- {
- CCLog("联网超时 %i",res);
- }
- curl_easy_cleanup(curl);
- }
- else
- {
- CCLog("curl is null");
- return ;
- }
- }
void HelloWorld::useGet()
{CURL *curl;CURLcode res;curl=curl_easy_init();if(curl){curl_easy_setopt(curl,CURLOPT_URL,"http://dota.uuu9.com/rss.xml");curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,writehtml);res=curl_easy_perform(curl);if(res!=CURLE_OK){CCLog("联网超时 %i",res);}curl_easy_cleanup(curl);}else{CCLog("curl is null");return ;}
}
在writehtml函数中,将返回的数据全部保存到str中
- size_t HelloWorld::writehtml(uint8_t* ptr,size_t size,size_t number,void *stream)
- {
- char* buffer=new char[16*1024+1];
- memset(buffer,0,16*1024+1);
- sprintf(buffer,"%s",ptr);
- CCLog("data length is %d",strlen(buffer));
- CCLog("size*number is %i",size*number);
- //CCLog("%s",ptr);
- str=str+buffer;
- delete []buffer;
- return size*number;//这里一定要放回实际返回的字节数
- }
size_t HelloWorld::writehtml(uint8_t* ptr,size_t size,size_t number,void *stream)
{char* buffer=new char[16*1024+1];memset(buffer,0,16*1024+1);sprintf(buffer,"%s",ptr);CCLog("data length is %d",strlen(buffer));CCLog("size*number is %i",size*number);//CCLog("%s",ptr);str=str+buffer;delete []buffer;return size*number;//这里一定要放回实际返回的字节数
}
这里我测试过,最大返回16k的数据,C Style字符串规定,最后一个字节是\0,所以多出一个字节存放\0。下面是从游久返回的数据,已经全部解析出来了:
- DOTA
- 专题站 - 游久(U9)网 -DOTA6.66 - DOTA6.67 - DOTA6.66B - AI - DOTA - 地图下载
- http://dota.uuu9.com/
- 最专业的DOTA专题站,提供最全面最新的地图下载,大型英雄专题,英雄模拟器,录像,战报,攻略。最新,最快,最全,一切尽在DOTA.UUU9.COM
- zh-CN
- http://dota.uuu9.com/rss.xml
- [视频] 小满食尸鬼:笑容如何从脸上消失的
- http://dota.uuu9.com/201306/101447.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-19 9:23:24
- http://dota.uuu9.com/201306/101447.shtml
- [视频] 黑曼巴出品:曼巴时刻top10第十二弹
- http://dota.uuu9.com/201306/101446.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-19 9:17:19
- http://dota.uuu9.com/201306/101446.shtml
- [视频] 凯文教你打Carry:团战之王 幽鬼
- http://dota.uuu9.com/201306/101445.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-19 9:07:31
- http://dota.uuu9.com/201306/101445.shtml
- [视频] WGT现场pis采访:暂不考虑征战DOTA2
- http://dota.uuu9.com/201306/101444.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-18 18:49:37
- http://dota.uuu9.com/201306/101444.shtml
- [视频] Ks夫妻二人套路黑:拍拍与lion的故事
- http://dota.uuu9.com/201306/101443.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-18 18:25:39
- http://dota.uuu9.com/201306/101443.shtml
- [视频] 抱抱熊出品:DOTA意识流特比拼VOL.38
- http://dota.uuu9.com/201306/101438.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-18 17:02:51
- http://dota.uuu9.com/201306/101438.shtml
- [视频] 丶没有bi要出品:操作集锦 第六期
- http://dota.uuu9.com/201306/101434.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-18 11:15:52
- http://dota.uuu9.com/201306/101434.shtml
- [视频] 抱抱熊出品:DOTA集锦每周TOP7第55期
- http://dota.uuu9.com/201306/101433.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-18 11:02:16
- http://dota.uuu9.com/201306/101433.shtml
- [视频] ECL小组赛:Orange vs Rstars回顾
- http://dota2.uuu9.com/201306/446153.shtml
- 2013-6-18 10:36:35
- http://dota2.uuu9.com/201306/446153.shtml
- [视频] 专访GTL西北赛区线下赛嘉宾ZSMJ
- http://dota2.uuu9.com/201306/446152.shtml
- 2013-6-18 10:11:22
- http://dota2.uuu9.com/201306/446152.shtml
- [视频] Alienware Cup LGD vs DK两场回顾
- http://dota2.uuu9.com/201306/446139.shtml
- 2013-6-18 9:45:41
- http://dota2.uuu9.com/201306/446139.shtml
- [视频] 游久DOTA精彩集锦第一期:影魔时刻
- http://dota.uuu9.com/201306/101427.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-18 8:43:42
- http://dota.uuu9.com/201306/101427.shtml
- [图赏] WGT颁奖图赏 Pis,Maybe高举奖杯
- http://dota.uuu9.com/201306/101425.shtml
- 2013-6-17 17:15:49
- http://dota.uuu9.com/201306/101425.shtml
- [视频] 牛蛙DOTA1/2拍拍熊:超神霸气的杀戮
- http://dota.uuu9.com/201306/101423.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 15:45:31
- http://dota.uuu9.com/201306/101423.shtml
- [视频] 水友制作娱乐视频:蛋疼镜头集锦124期
- http://dota.uuu9.com/201306/101419.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 14:54:53
- http://dota.uuu9.com/201306/101419.shtml
- [视频] ZEAM出品教父制作:捣塔冷笑话第五弹
- http://dota.uuu9.com/201306/101417.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 14:41:16
- http://dota.uuu9.com/201306/101417.shtml
- [视频] 浅雪dota:教大家打先手(纯属娱乐)
- http://dota.uuu9.com/201306/101421.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 12:15:43
- http://dota.uuu9.com/201306/101421.shtml
- [视频] WGT总决赛Greedy战胜LJBF视频回顾
- http://dota.uuu9.com/201306/101413.shtml
- WGT线下赛总决赛 Greedy VS LJBF
- 2013-6-17 11:45:02
- http://dota.uuu9.com/201306/101413.shtml
- [视频] 彩笔制作:DOTA反杀集锦Top10第64期
- http://dota.uuu9.com/201306/101412.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 11:31:17
- http://dota.uuu9.com/201306/101412.shtml
- [视频] DotA搞笑视频:论演员自我修养第五期
- http://dota.uuu9.com/201306/101411.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 11:05:58
- http://dota.uuu9.com/201306/101411.shtml
- [视频] 每周DOTA搞笑镜头:FunnyTOP10第78期
- http://dota.uuu9.com/201306/101410.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 10:57:31
- http://dota.uuu9.com/201306/101410.shtml
- [视频] 小乖第一视角:酣畅淋漓的影魔二连发
- http://dota.uuu9.com/201306/101409.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 9:42:07
- http://dota.uuu9.com/201306/101409.shtml
- [视频] Nada从顶单排10:中单巫医与中单流浪
- http://dota.uuu9.com/201306/101408.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-17 9:33:45
- http://dota.uuu9.com/201306/101408.shtml
- [视频] P神怒秀sf WGT胜者组Greedy vs PMM
- http://dota.uuu9.com/201306/101402.shtml
- WGT胜者组决赛Greedy vs PMM视频回顾
- 2013-6-16 12:32:10
- http://dota.uuu9.com/201306/101402.shtml
- [视频] 满楼水平第一视角:跳刀沙王就是干
- http://dota.uuu9.com/201306/101405.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-16 12:28:48
- http://dota.uuu9.com/201306/101405.shtml
- [视频] ks从1800单排9-11:火女,女王,毒狗
- http://dota.uuu9.com/201306/101404.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-16 12:22:02
- http://dota.uuu9.com/201306/101404.shtml
- [视频] 直播回顾 浅浅打野斧王第一视角
- http://dota.uuu9.com/201306/101401.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-16 11:54:02
- http://dota.uuu9.com/201306/101401.shtml
- [视频] DOTA直播回顾:天使焦先知第一视角
- http://dota.uuu9.com/201306/101400.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-16 11:48:13
- http://dota.uuu9.com/201306/101400.shtml
- [图赏] WGT2013现场图赏 PIS再战职业首秀
- http://dota.uuu9.com/201306/101393.shtml
- 2013-6-15 14:30:08
- http://dota.uuu9.com/201306/101393.shtml
- [视频] 小满鱼人第一视角:重回高手房匹配
- http://dota.uuu9.com/201306/101392.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-15 13:14:32
- http://dota.uuu9.com/201306/101392.shtml
- [视频] 舞儿蓝猫第一视角:劣势局飘逸逆袭
- http://dota.uuu9.com/201306/101391.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-15 13:09:42
- http://dota.uuu9.com/201306/101391.shtml
- [视频] 凯文教你打Carry:4V5的翻盘小黑
- http://dota.uuu9.com/201306/101385.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-15 0:43:04
- http://dota.uuu9.com/201306/101385.shtml
- [视频] Ks从1800单排7-8:老虎,先知无剧透
- http://dota.uuu9.com/201306/101382.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-14 16:51:55
- http://dota.uuu9.com/201306/101382.shtml
- [视频] 820dota第一视角:6.78新版暴力武士
- http://dota.uuu9.com/201306/101377.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-14 14:25:53
- http://dota.uuu9.com/201306/101377.shtml
- [视频] 09从零单排第二季41-42:山岭黑鸟
- http://dota.uuu9.com/201306/101376.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-14 14:13:57
- http://dota.uuu9.com/201306/101376.shtml
- [视频] Zero_C出品:极限反杀Top10 臂章特辑
- http://dota.uuu9.com/201306/101372.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-14 10:24:41
- http://dota.uuu9.com/201306/101372.shtml
- [视频] 牛蛙月骑第一视角:拉远古极限FARM
- http://dota.uuu9.com/201306/101370.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-14 9:30:59
- http://dota.uuu9.com/201306/101370.shtml
- [视频] Nada从顶单排9:撼地神牛第一视角
- http://dota.uuu9.com/201306/101369.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-14 9:22:33
- http://dota.uuu9.com/201306/101369.shtml
- [视频] Ks水友赛第一周:天差地别的两盘给跪
- http://dota.uuu9.com/201306/101368.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-14 9:15:24
- http://dota.uuu9.com/201306/101368.shtml
- [视频] 小乖顶端的开始7:激情影魔小鱼合集
- http://dota.uuu9.com/201306/101364.shtml
- 您还没有安装flash播放器,请点击这里安装
- 2013-6-13 16:12:29
- http://dota.uuu9.com/201306/101364.shtml
DOTA
专题站 - 游久(U9)网 -DOTA6.66 - DOTA6.67 - DOTA6.66B - AI - DOTA - 地图下载
http://dota.uuu9.com/
最专业的DOTA专题站,提供最全面最新的地图下载,大型英雄专题,英雄模拟器,录像,战报,攻略。最新,最快,最全,一切尽在DOTA.UUU9.COM
zh-CN
http://dota.uuu9.com/rss.xml[视频] 小满食尸鬼:笑容如何从脸上消失的
http://dota.uuu9.com/201306/101447.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-19 9:23:24
http://dota.uuu9.com/201306/101447.shtml[视频] 黑曼巴出品:曼巴时刻top10第十二弹
http://dota.uuu9.com/201306/101446.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-19 9:17:19
http://dota.uuu9.com/201306/101446.shtml[视频] 凯文教你打Carry:团战之王 幽鬼
http://dota.uuu9.com/201306/101445.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-19 9:07:31
http://dota.uuu9.com/201306/101445.shtml[视频] WGT现场pis采访:暂不考虑征战DOTA2
http://dota.uuu9.com/201306/101444.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-18 18:49:37
http://dota.uuu9.com/201306/101444.shtml[视频] Ks夫妻二人套路黑:拍拍与lion的故事
http://dota.uuu9.com/201306/101443.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-18 18:25:39
http://dota.uuu9.com/201306/101443.shtml[视频] 抱抱熊出品:DOTA意识流特比拼VOL.38
http://dota.uuu9.com/201306/101438.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-18 17:02:51
http://dota.uuu9.com/201306/101438.shtml[视频] 丶没有bi要出品:操作集锦 第六期
http://dota.uuu9.com/201306/101434.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-18 11:15:52
http://dota.uuu9.com/201306/101434.shtml[视频] 抱抱熊出品:DOTA集锦每周TOP7第55期
http://dota.uuu9.com/201306/101433.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-18 11:02:16
http://dota.uuu9.com/201306/101433.shtml[视频] ECL小组赛:Orange vs Rstars回顾
http://dota2.uuu9.com/201306/446153.shtml2013-6-18 10:36:35
http://dota2.uuu9.com/201306/446153.shtml[视频] 专访GTL西北赛区线下赛嘉宾ZSMJ
http://dota2.uuu9.com/201306/446152.shtml2013-6-18 10:11:22
http://dota2.uuu9.com/201306/446152.shtml[视频] Alienware Cup LGD vs DK两场回顾
http://dota2.uuu9.com/201306/446139.shtml2013-6-18 9:45:41
http://dota2.uuu9.com/201306/446139.shtml[视频] 游久DOTA精彩集锦第一期:影魔时刻
http://dota.uuu9.com/201306/101427.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-18 8:43:42
http://dota.uuu9.com/201306/101427.shtml[图赏] WGT颁奖图赏 Pis,Maybe高举奖杯
http://dota.uuu9.com/201306/101425.shtml2013-6-17 17:15:49
http://dota.uuu9.com/201306/101425.shtml[视频] 牛蛙DOTA1/2拍拍熊:超神霸气的杀戮
http://dota.uuu9.com/201306/101423.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 15:45:31
http://dota.uuu9.com/201306/101423.shtml[视频] 水友制作娱乐视频:蛋疼镜头集锦124期
http://dota.uuu9.com/201306/101419.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 14:54:53
http://dota.uuu9.com/201306/101419.shtml[视频] ZEAM出品教父制作:捣塔冷笑话第五弹
http://dota.uuu9.com/201306/101417.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 14:41:16
http://dota.uuu9.com/201306/101417.shtml[视频] 浅雪dota:教大家打先手(纯属娱乐)
http://dota.uuu9.com/201306/101421.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 12:15:43
http://dota.uuu9.com/201306/101421.shtml[视频] WGT总决赛Greedy战胜LJBF视频回顾
http://dota.uuu9.com/201306/101413.shtml
WGT线下赛总决赛 Greedy VS LJBF
2013-6-17 11:45:02
http://dota.uuu9.com/201306/101413.shtml[视频] 彩笔制作:DOTA反杀集锦Top10第64期
http://dota.uuu9.com/201306/101412.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 11:31:17
http://dota.uuu9.com/201306/101412.shtml[视频] DotA搞笑视频:论演员自我修养第五期
http://dota.uuu9.com/201306/101411.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 11:05:58
http://dota.uuu9.com/201306/101411.shtml[视频] 每周DOTA搞笑镜头:FunnyTOP10第78期
http://dota.uuu9.com/201306/101410.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 10:57:31
http://dota.uuu9.com/201306/101410.shtml[视频] 小乖第一视角:酣畅淋漓的影魔二连发
http://dota.uuu9.com/201306/101409.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 9:42:07
http://dota.uuu9.com/201306/101409.shtml[视频] Nada从顶单排10:中单巫医与中单流浪
http://dota.uuu9.com/201306/101408.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-17 9:33:45
http://dota.uuu9.com/201306/101408.shtml[视频] P神怒秀sf WGT胜者组Greedy vs PMM
http://dota.uuu9.com/201306/101402.shtml
WGT胜者组决赛Greedy vs PMM视频回顾
2013-6-16 12:32:10
http://dota.uuu9.com/201306/101402.shtml[视频] 满楼水平第一视角:跳刀沙王就是干
http://dota.uuu9.com/201306/101405.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-16 12:28:48
http://dota.uuu9.com/201306/101405.shtml[视频] ks从1800单排9-11:火女,女王,毒狗
http://dota.uuu9.com/201306/101404.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-16 12:22:02
http://dota.uuu9.com/201306/101404.shtml[视频] 直播回顾 浅浅打野斧王第一视角
http://dota.uuu9.com/201306/101401.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-16 11:54:02
http://dota.uuu9.com/201306/101401.shtml[视频] DOTA直播回顾:天使焦先知第一视角
http://dota.uuu9.com/201306/101400.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-16 11:48:13
http://dota.uuu9.com/201306/101400.shtml[图赏] WGT2013现场图赏 PIS再战职业首秀
http://dota.uuu9.com/201306/101393.shtml2013-6-15 14:30:08
http://dota.uuu9.com/201306/101393.shtml[视频] 小满鱼人第一视角:重回高手房匹配
http://dota.uuu9.com/201306/101392.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-15 13:14:32
http://dota.uuu9.com/201306/101392.shtml[视频] 舞儿蓝猫第一视角:劣势局飘逸逆袭
http://dota.uuu9.com/201306/101391.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-15 13:09:42
http://dota.uuu9.com/201306/101391.shtml[视频] 凯文教你打Carry:4V5的翻盘小黑
http://dota.uuu9.com/201306/101385.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-15 0:43:04
http://dota.uuu9.com/201306/101385.shtml[视频] Ks从1800单排7-8:老虎,先知无剧透
http://dota.uuu9.com/201306/101382.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-14 16:51:55
http://dota.uuu9.com/201306/101382.shtml[视频] 820dota第一视角:6.78新版暴力武士
http://dota.uuu9.com/201306/101377.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-14 14:25:53
http://dota.uuu9.com/201306/101377.shtml[视频] 09从零单排第二季41-42:山岭黑鸟
http://dota.uuu9.com/201306/101376.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-14 14:13:57
http://dota.uuu9.com/201306/101376.shtml[视频] Zero_C出品:极限反杀Top10 臂章特辑
http://dota.uuu9.com/201306/101372.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-14 10:24:41
http://dota.uuu9.com/201306/101372.shtml[视频] 牛蛙月骑第一视角:拉远古极限FARM
http://dota.uuu9.com/201306/101370.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-14 9:30:59
http://dota.uuu9.com/201306/101370.shtml[视频] Nada从顶单排9:撼地神牛第一视角
http://dota.uuu9.com/201306/101369.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-14 9:22:33
http://dota.uuu9.com/201306/101369.shtml[视频] Ks水友赛第一周:天差地别的两盘给跪
http://dota.uuu9.com/201306/101368.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-14 9:15:24
http://dota.uuu9.com/201306/101368.shtml[视频] 小乖顶端的开始7:激情影魔小鱼合集
http://dota.uuu9.com/201306/101364.shtml
您还没有安装flash播放器,请点击这里安装
2013-6-13 16:12:29
http://dota.uuu9.com/201306/101364.shtml
这里我感觉到有点奇怪,这里解析出来的数据比服务器返回的数据要少。以前我在做Android解析XML的时候也是仅仅解析出来了一半,不过使用纯java的话,是可以全部解析出来的。这应该是从游久返回的数据有问题,我解析从自己搭建的服务器返回的数据是完美的。
一般情况下我是要上传工程的源代码的,这次上传出了问题,过几天再上传吧。
【Cocos2d-x游戏引擎开发笔记(25)】XML解析相关推荐
- 简单游戏引擎开发笔记(一)
---恢复内容开始--- 一.游戏引擎简介 1.概念 游戏引擎是指一些已编写好的可编辑电脑游戏系统或者一些互交式实时图像应用程序的核心组件.这些系统为游戏设计者提供各种编写游戏所需的各种工具,其目的在 ...
- libgdx游戏引擎开发笔记(一)引擎介绍和Helloworld
做Android快一年了,项目也做了四五个,感觉没什么动力向前,思绪整理了一段时间,决定转入Android游戏开发,同时发现了一款强大的游戏引擎libgdx,在此边学边整理,好记性不如烂笔头嘛! ...
- libgdx游戏引擎开发笔记(十)SuperJumper游戏例子的讲解(篇四)---- 主游戏界面内部框架编写...
上一讲,我们已经实现了点击play进入游戏界面但仅仅是个黑屏 今天,我们就试着编写代码让它出现游戏的一些简单场景.还是在上一讲的代码基础上,我们创建两个类:World 和 WorldRenderer ...
- libgdx游戏引擎开发笔记(十三)SuperJumper游戏例子的讲解(篇七)----各个物体的创建及其碰撞检测...
接着上一篇,我们完成后续的扫尾工作:游戏中个物体创建及其碰撞检测,分数保存,音效处理. 1.World类:(加入所有物体,及其碰撞检测,代码里有详细注解) package com.zhf.myl ...
- 【Cocos2d-x游戏引擎开发笔记(13)】Tiled Map Editor(一)
原创文章,转载请注明出处:http://blog.csdn.net/zhy_cheng/article/details/8308609 Tiled Map Editor是Cocos2d-x支持的地图编 ...
- 用C++实现跨平台游戏引擎开发
游戏开发系列 用C++实现跨平台游戏引擎开发 你是否梦想写一部格斗游戏但却无从着手呢?是否你只因游戏开发好玩而对之感兴趣?本文我们将分析一个通用的跨平台游戏引擎,每个游戏开发新手都可以自由地使用它. ...
- unity应用开发实战案例_Unity3D游戏引擎开发实战从入门到精通
Unity3D游戏引擎开发实战从入门到精通(坦克大战项目实战.NGUI开发.GameObject) 一.Unity3D游戏引擎开发实战从入门到精通是怎么样的一门课程(介绍) 1.1.Unity3D游戏 ...
- 游戏系统开发笔记(六)——服务端架构设计
. http://blog.csdn.net/mooke/article/details/8913051 上回写了写服务端的分层结构,分层是比较宏观上的东西,至于层次间具体的交互方式还得通过各个模块的 ...
- 游戏系统开发笔记(三)——通用代码库
墨水比较有限,工作时基本也都是着眼小处,除了工作内容涉及过的几个模块,其余的暂时并未多作关注,所以基本上还只是停留在感性认识上.不过我倒觉得这是难免,毕竟游戏产品放到整个软件行业来说也是个较复杂的东西 ...
- 游戏引擎开发和物理引擎_视频游戏开发的最佳游戏引擎
游戏引擎开发和物理引擎 In this article, we'll look at some of the most popular game engines for video game deve ...
最新文章
- 语言中拟合函数 计算aic_Go语言函数深度解析(中)
- 爬虫推特数据分析的外文文献_13天让你学会爬虫分布式,说到让你做到择推出it届附教程...
- 训练集山准确率高测试集上准确率很低_推荐算法改版前的AB测试
- NET问答: 重写了 Equals,还有必要重写 GetHashCode 吗?
- 微软是如何使用 C# 重写 C# 编译器并将其开源的
- Jquery实战——横纵向的菜单
- 记一次生成唯一ID的问题
- transforms.Compose()函数
- 密文恢复出明文的过程称为_整流二极管的反向恢复过程图解
- Facebook将偷来的3D对象数据库用于其AI项目:被诉讼
- Android应用内存泄漏的定位、分析与解决策略 1
- 20180514-A · Star Wars Survey · ggplot2 ggdraw geom_bar facet_grid magick 柱状图 条形图 · R 语言数据可视化 案例 源码
- scratch编程小游戏——黄金矿工
- 仿支付宝头像外加一个边框的工具类
- 链公公 x 凰药师 x 元天益生:供应链金融支持健康与科技农业 |Chain++
- 谈谈win10的简单美化
- numpy 处理txt的简单样例
- Jenkins自动化部署(java+maven+tomcat项目)
- 算法刷题路线总结与相关资料分享
- ZJOI2019 麻将