当前位置: 首页 > news >正文

美食网站开发意义大连筑成建设集团有限公司网站

美食网站开发意义,大连筑成建设集团有限公司网站,dede 网站模板,十大营销策划公司排名rapidxml是一个快速的xml库#xff0c;由C模板实现的高效率xml解析库#xff0c;同时也是boost库的property_tree的内置解析库。 当时rapidxml时#xff0c;只需要把rapidxml.hpp 、 rapidxml_print.hpp 和 rapidxml_utils.hpp 三个文件拷贝到你的工程目录下#xff0c;就可…      rapidxml是一个快速的xml库由C模板实现的高效率xml解析库同时也是boost库的property_tree的内置解析库。 当时rapidxml时只需要把rapidxml.hpp 、 rapidxml_print.hpp 和 rapidxml_utils.hpp 三个文件拷贝到你的工程目录下就可以了。 下面的是测试代码 main.cpp #include iostream #include string #include vector #include rapidxml/rapidxml.hpp #include rapidxml/rapidxml_print.hpp #include rapidxml/rapidxml_utils.hppusing namespace std;int main(int argc, char** argv) {vectorstring v_str ;vectorstring::iterator it ;v_str.push_back(111111);v_str.push_back(222222);v_str.push_back(333333);v_str.push_back(444444);using namespace rapidxml;xml_document doc; //构造一个空的xml文档xml_node* rot doc.allocate_node(rapidxml::node_pi, doc.allocate_string(setting.xml version1.0 encodingutf-8));//allocate_node分配一个节点该节点类型为node_pi对XML文件进行描描述内容在allocate_string中doc.append_node(rot); //把该节点添加到doc中xml_node* node doc.allocate_node(node_element, root, NULLxml_node* analysis doc.allocate_node(node_element, Analysis, NULL);node-append_node(analysis);for (it v_str.begin(); it ! v_str.end(); it) {xml_node* soinfo doc.allocate_node(node_element, soinfo, NULL);soinfo-append_attribute(doc.allocate_attribute(key, it-c_str()));analysis-append_node(soinfo);}xml_node* Output doc.allocate_node(node_element, Output, NULL);node-append_node(Output);xml_node* outinfo doc.allocate_node(node_element, outinfo, NULL);Output-append_node(outinfo);for (int j 0;j 2; j) {xml_node* type doc.allocate_node(node_element, desc, NULL); //分配一个type节点type-append_attribute(doc.allocate_attribute(path, 123));type-append_attribute(doc.allocate_attribute(relation, 345));type-append_attribute(doc.allocate_attribute(priority, 567));outinfo-append_node(type); //把type节点添加到节点outinfo中}for (it v_str.begin(); it ! v_str.end(); it) {xml_node* rule doc.allocate_node(node_element, rule, NULL);Output-append_node(rule);for (int i 0; i 2 ; i) {xml_node* cond doc.allocate_node(node_element, cond, NULL);cond-append_attribute(doc.allocate_attribute(key, 123));cond-append_attribute(doc.allocate_attribute(value, 345));cond-append_attribute(doc.allocate_attribute(relation,567));rule-append_node(cond);}xml_node* out doc.allocate_node(node_element, out, NULL);out-append_attribute(doc.allocate_attribute(where, it-c_str()));rule-append_node(out);}doc.append_node(node);std::ofstream pout(config.xml);pout doc;return 0; }下面是生成的xml文件 config.xml ?setting.xml version1.0 encodingutf-8 ? rootAnalysissoinfo key111111/soinfo key222222/soinfo key333333/soinfo key444444//AnalysisOutputoutinfodesc path123 relation345 priority567/desc path123 relation345 priority567//outinforulecond key123 value345 relation567/cond key123 value345 relation567/out where111111//rulerulecond key123 value345 relation567/cond key123 value345 relation567/out where222222//rulerulecond key123 value345 relation567/cond key123 value345 relation567/out where333333//rulerulecond key123 value345 relation567/cond key123 value345 relation567/out where444444//rule/Output /root
http://www.sczhlp.com/news/228834/

相关文章:

  • 找人做网站需要花多少钱传媒公司注册经营范围
  • 昆明制作网站企业网站结构
  • 北京 营销型网站建设工程公开招标网站
  • 网站使用网络图片做素材 侵权吗天津建设厅官方网站
  • 详细介绍:2025 年 AI+BI 趋势下,Wyn 商业智能软件如何重构企业决策效率?
  • 2025年小型收卷机生产商权威推荐榜单:收卷机械设备/多功能收卷机/收卷机械源头厂家精选
  • CICD流程建设之持续集成实践指南
  • Codeforces Round 1049 (Div. 2)C. Ultimate Value
  • iPhone 上某人发来的短信消失了?9 种解决方法
  • 高端网站设计开发福建移动网站设计
  • c#网站开发工具贵港网站建设代理
  • 招聘高级网站建设有哪些网站是可以接单做任务的
  • 宁波网站制作工作室wordpress 多站
  • 苏州行业网站建设服务如何用虚拟主机建设网站
  • 郑州网站建设优化专业的网站设计公司
  • 思政网站建设管理自查报告电商之家官网
  • 网站加入站长统计宁夏建设银行网站
  • 深圳找工作哪个网站好网址导航浏览器下载
  • 做网站材料成立公司需要几个股东
  • 能打开各种网站的浏览器下载用python怎么做网站
  • 申请一个网站需要多少钱wordpress 站点迁移
  • 英迈寰球网站建设怎么做律师事务所的网站
  • 建设银行此网站的安全证书有问题.免费网络电视直播在线观看
  • 仿牌网站专用vps附近旧模板出售市场
  • 平台网站建设外包费用汕头手机端建站模板
  • 装饰公司在哪个网站上接活口碑营销图片
  • 三把火科技网站设计十大外贸网站
  • 桂阳城乡建设局网站全网营销网站怎么做
  • 万网的成品网站wordpress 数据字典
  • 高端品牌网站建设有哪些网页游戏排行榜2023