13 Star 69 Fork 22

johnsonyl/cpps

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
xml.cpp 954 Bytes
一键复制 编辑 原始数据 按行查看 历史
johnsonyl 提交于 2021-01-26 14:47 +08:00 . 2021-01-26 更新
#include <cpps/cpps.h>
#include "xml.hpp"
using namespace cpps;
cpps_export_void cpps_attach(C* c)
{
cpps_init_cpps_class(c);
_module(c, "xml")[
_class<xml_document>("document")
.def("parse",&xml_document::parse)
.def("clear",&xml_document::clear)
.def_inside("children", &xml_document::children)
.def_inside("children_by_name", &xml_document::children_by_name),
_class<xml_node>("node")
.def("type",&xml_node::type)
.def("name",&xml_node::name)
.def("value",&xml_node::value)
.def_inside("children", &xml_node::children)
.def_inside("children_by_name", &xml_node::children_by_name)
.def_inside("attributes", &xml_node::attributes)
.def_inside("attributes_by_name", &xml_node::attributes_by_name),
_class<xml_attribute>("attribute")
.def("name",&xml_attribute::name)
.def("value",&xml_attribute::value)
];
}
cpps_export_void cpps_detach(C * c)
{
}
cpps_export_finish
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/cppscript/cpps.git
git@gitee.com:cppscript/cpps.git
cppscript
cpps
cpps
v1.0.0

搜索帮助