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

昆明php网站建设网络营销的作用和意义

昆明php网站建设,网络营销的作用和意义,购物网站管理系统,如何做行业平台网站rapidxml是一个快速的xml库,由C模板实现的高效率xml解析库,同时也是boost库的property_tree的内置解析库。 当时rapidxml时,只需要把rapidxml.hpp 、 rapidxml_print.hpp 和 rapidxml_utils.hpp 三个文件拷贝到你的工程目录下,就可…

      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.hpp"using namespace std;int main(int argc, char** argv) {vector<string>  v_str ;vector<string>::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 version='1.0' encoding='utf-8'"));//allocate_node分配一个节点,该节点类型为node_pi,对XML文件进行描,描述内容在allocate_string中doc.append_node(rot); //把该节点添加到doc中xml_node<>* node = doc.allocate_node(node_element, "root", NULL);xml_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 version='1.0' encoding='utf-8' ?>
<root><Analysis><soinfo key="111111"/><soinfo key="222222"/><soinfo key="333333"/><soinfo key="444444"/></Analysis><Output><outinfo><desc path="123" relation="345" priority="567"/><desc path="123" relation="345" priority="567"/></outinfo><rule><cond key="123" value="345" relation="567"/><cond key="123" value="345" relation="567"/><out where="111111"/></rule><rule><cond key="123" value="345" relation="567"/><cond key="123" value="345" relation="567"/><out where="222222"/></rule><rule><cond key="123" value="345" relation="567"/><cond key="123" value="345" relation="567"/><out where="333333"/></rule><rule><cond key="123" value="345" relation="567"/><cond key="123" value="345" relation="567"/><out where="444444"/></rule></Output>
</root>




http://www.hengruixuexiao.com/news/43874.html

相关文章:

  • 电脑怎么做网站电商运营培训机构哪家好
  • 怎么给自己的网站做模版沈阳网站建设制作公司
  • wix建站教程营销推广手段有什么
  • 设计网站注意哪些问题流量平台有哪些
  • 网站建设 html5视频营销的策略与方法
  • 软件测试网站开发与测试唐山公司做网站
  • 网站图片标题背景怎样做的seo网络推广经理
  • 做深度的互联网站免费推广论坛
  • python做的网站有什么漏洞培训教育机构
  • 性做爰网站今日广州新闻最新消息
  • 郑州做商城网站微商怎么引流被加精准粉
  • 制作网站的公司(深圳)新人跑业务怎么找客户
  • 大石桥网站制作学网络运营需要多少钱
  • 网站不收录友链申请
  • php版本不同于wordpress使用网站seo应用
  • 怎么做免费公司网站专业网络推广
  • 学做网站论坛全部视频厦门seo外包公司
  • 甪直做网站常见的微信营销方式有哪些
  • 动态网站开发工程师证搜索引擎推广方案案例
  • 区块链平台定制开发桔子seo工具
  • 巴彦淖尔网站制作开发sem培训班培训多少钱
  • 免费域名注册平台永久seo学习论坛
  • WordPress可以配置163邮箱吗seo零基础视频教程
  • 镇江网站建设找 思创十堰seo优化
  • 哪里网站建设联系方式seo排名赚官网
  • 外国做网站的平台百度推广和优化有什么区别
  • 行业资讯网站源码企业品牌推广方案
  • 地下城钓鱼网站怎么做网络推广是做什么工作的
  • 网站用橙色链接优化方法
  • 手机软件开发培训seo