资源简介
用于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
相关资源
-
Notepad++ 的lua.xm
l 语法高亮和自动补 - Lua5.2源码
- 调用webservice,通过post传参读取返回的
-
xm
l学习文档DTD Schema SAX DOM XSL XPATH - 触摸精灵lua脚本更新源码
-
kettle解析xm
l多层分组嵌套数据,S -
Socket xm
l 测试 -
AS3.0读取xm
l外调图片并滚动 -
《xm
l》实验任务书 xm l Basics & DT -
maven archetype-catalog.xm
l -
QT4 xm
l与QTableWidget的结合,QTableWid -
xm
lDOM对象手册.chm - LuaInterface资源包
- xlua+unity单机版捕鱼视频教程+源码
- lua5.3解释器
-
《xm
l》实验(3) -- XQuery - wireshark lua 插件 解析提取网络报文传
-
xm
l图书管理系统 -
xm
l学生管理系统 -
遍历文件文件夹及导出xm
l -
xm
l——sax解析 极速入门易懂 - luac逆向工具
-
duibib做的QQ启动界面资源与xm
l - windows7下Lua的编译,使用Visual Studio
- Lua 5.1 for delphi 2010-XE4
-
读取xm
l,生存生成树形节点 -
css xm
l css xm l css xm l css xm l -
Openxm
lPPT官方Demo -
tinyxm
l2++介绍文档 -
基于xm
l的商品信息管理系统
评论
共有 条评论