资源简介
用于lua的XML文件解析
LuaXML provides a minimal set of functions for the processing of XML data in Lua.

代码片段和文件信息
/**
Luaxml License
Luaxml is licensed under the terms of the MIT license reproduced below
the same as Lua itself. This means that Luaxml is free software and can be
used for both academic and commercial purposes at absolutely no cost.
Copyright (C) 2007-2010 Gerald Franz www.viremo.de
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#if defined __WIN32__ || defined WIN32
# include
# define _EXPORT __declspec(dllexport)
#else
# define _EXPORT
#endif
#include
#include
#include
#include
#include
#include
#include
static const char ESC=27;
static const char OPN=28;
static const char CLS=29;
//--- auxliary functions -------------------------------------------
static const char* char2code(unsigned char ch char buf[8]) {
unsigned char i=0;
buf[i++]=‘&‘;
buf[i++]=‘#‘;
if(ch>99) buf[i++]=ch/100+48;
if(ch>9) buf[i++]=(ch%100)/10+48;
buf[i++]=ch%10+48;
buf[i++]=‘;‘;
buf[i]=0;
return buf;
}
static size_t find(const char* s const char* pattern size_t start) {
const char* found =strstr(s+start pattern);
return found ? found-s : strlen(s);
}
//--- internal tokenizer -------------------------------------------
typedef struct Tokenizer_s {
/// stores string to be tokenized
const char* s;
/// stores size of string to be tokenized
size_t s_size;
/// stores current read position
size_t i;
/// stores current read context
int tagMode;
/// stores next token if already determined
const char* m_next;
/// size of next token
size_t m_next_size;
/// pointer to current token
char* m_token;
/// size of current token
size_t m_token_size;
/// capacity of current token
size_t m_token_capacity;
} Tokenizer;
Tokenizer* Tokenizer_new(const char* str size_t str_size) {
Tokenizer *tok = (Tokenizer*)malloc(sizeof(Tokenizer));
memset(tok 0 sizeof(Tokenizer));
tok->s_size = str_size;
tok->s = str;
return tok;
}
void Tokenizer_delete(Tok
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 65376 2008-09-11 07:30 lua51.dll
文件 11264 2008-09-11 07:30 lua.exe
文件 13700 2007-07-02 21:36 Luaxm
文件 12989 2010-10-12 20:59 Luaxm
文件 27195 2010-10-12 20:53 Luaxm
文件 16979 2010-10-12 20:59 Luaxm
文件 3810 2008-12-29 17:05 Luaxm
文件 3476 2007-07-02 21:39 Luaxm
文件 1058 2009-09-06 10:03 Makefile
文件 6857 2010-10-12 21:05 readme.txt
文件 455 2009-09-06 10:00 test.lua
文件 5586 2010-10-12 19:45 test.xm
相关资源
- J2EE 配置文件
-
开源tinyxm
l - 常用编码(UnicodeUTF-8GBK)转换工具
-
图片和xm
l格式互换 -
xm
l多个文件合并(delphi) -
xm
l课件及例题(xm l) -
《xm
l编程原理与实例教程》电子教 -
将数据库的表生成xm
l文件 -
简单的xm
l投票系统 - 王者透视自瞄.lua
-
notepad++包含xm
l tools等插件 -
Volley获取json和xm
l数据解析显示 - grpc-lua CentOS 7.4 执行程序打包
- 用lua写一份阴历阳历互转
-
李刚疯狂xm
l讲义第2版完整源码 -
maven settings.xm
l 直接使用 - Unity3D 实战视频教程 保卫萝卜 2D 游戏
- Synthesis and biological evaluation of cytotox
-
Notepad++的xm
l格式化工具xm ltools_2 -
Notepad++的xm
l Tools插件格式化xm l文 -
map/list集合转化成xm
l字符串 xm l字 -
libxm
l2-2.9.4-rc2.tar.gz - Luaplus 53 Vs2015编译 通过 附使用说明
- LuaStudio7.23 完美破解版本
- antisamy策略文件
- Evaluation Quality of the Elderly‘s Living E
- Programming_in_Lua_4th_ed._(2017)_.pdf
- 现在最新版本lua,lua-5.2.3。
- lua-sha2-0.2.0.tar.gz
- Lua语言编程 中文版
评论
共有 条评论