Markup
解决VS2013 MSB8031问题
错误 1 error MSB8031: Building an MFC project for a non-Unicode character set is deprecated. You must change the project property to Unicode or download an additional library. See http://go.microsoft.com/fwlink/p/?LinkId=286820 for more information.
解决链接
https://www.codeprj.com/blog/68233d1.html
Markup学习
#include<stdlib.h>
#include
#include<string.h>
#include"Markup.h"
using namespace std;
int main()
{
CMarkup xml;
xml.SetDoc("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");
xml.AddElem((MCD_CSTR)"UserInfo"); //在当前主位置元素或最后兄弟位置之后增加一个元素
xml.IntoElem(); //进入当前主位置的下一级,当前的位置变为父位置。
xml.AddElem((MCD_CSTR)"UserID", (MCD_CSTR)"T");
xml.AddElem((MCD_CSTR)"UserID", (MCD_CSTR)"z");
xml.OutOfElem(); //使当前父位置变成当前位置。
xml.Save((MCD_CSTR)"UserInfoTTT.xml"); //可指定目录 将XML数据写入文件中
return 0;
}