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

写网站论文怎么做的学做网站卖东西去哪学

写网站论文怎么做的,学做网站卖东西去哪学,天津百度分公司,自己怎么设置会员网站相关链接 C —— Tinyxml2在Vs2017下相关使用1#xff08;附源码#xff09; tinyxml2简介 TinyXML2是一个简单#xff0c;小巧#xff0c;高效#xff0c;CXML解析器#xff0c;可以很容易地集成到其他程序中。TinyXML-2解析一个XML文档#xff0c;并从中构建一个 可以…相关链接 C —— Tinyxml2在Vs2017下相关使用1附源码 tinyxml2简介 TinyXML2是一个简单小巧高效CXML解析器可以很容易地集成到其他程序中。TinyXML-2解析一个XML文档并从中构建一个 可以读取、修改和保存的文档对象模型 DOM。XML代表“可扩展标记语言”。这是一个通用目的 用于描述任意数据的人类和机器可读标记语言。 为存储应用程序数据而创建的所有随机文件格式都可以 全部替换为 XML。一个解析器可以解决所有问题。 源码下载 Github - Tinyxml2源码下载地址 一般来说下载源码后无需编译仅将其中的tinyxml2.cpp、tinyxml2.h包含在自己的项目中就可以使用了。      若需构建库使用CMake构建源码然后利用Vs仅编译tinyxml2项目。 使用tinyxml2注意事项 TinyXML与实体 TinyXML认得预定义的特殊“字符实体”即: apos; ‘ 这些在XML文档读取时都会被辨认出来并会被转化成等价的UTF-8字符。代码写入xml ?xml version1.0 encodingUTF-8? Project DefaultTargetsBuild ToolsVersion15.0 xmlnshttp://schemas.microsoft.com/developer/msbuild/2003ItemGroup LabelProjectConfigurationsProjectConfigurations IncludeDebug|X64ConfigurationDebug/ConfigurationPlatformx64/Platform/ProjectConfigurationsProjectConfiguration IncludeRelease|X64ConfigurationRelease/ConfigurationPlatformx64/Platform/ProjectConfiguration/ItemGroupImport Project$(VCTargetsPath)\Microsoft.Cpp.Default.props/Import Project$(VCTargetsPath)\Microsoft.Cpp.props/ImportGroup ConditionExists(apos;$(QtMsBuild)\qt_defaults.propsapos;)Import Project$(QtMsBuild)\qt_defaults.props//ImportGroupPropertyGroup Conditionapos;$(Configuration)|$(Platform)apos; apos;Debug|x64apos; LabelQtSettingsQtInstall5.12.4(64)/QtInstallQtModulescore;gui;widgets;network;/QtModulesQtBuildConfigdebug/QtBuildConfig/PropertyGroupTarget NameQtMsBuildNotFound BeforeTargetsCustomBuild;ClCompile Condition!Exists(apos;$(QtMsBuild)\qt.targetsapos;) or !Exists(apos;$(QtMsBuild)\qt.propsapos;)Message ImportanceHigh TextQtMsBuild: could not locate qt.targets, qt.props; project may not build correctly.//TargetImportGroup LabelExtensionSettings/ImportGroup LabelShared/ImportGroup LabelPropertySheets Conditionapos;$(Configuration)|$(Platform)apos; apos;Debug|x64apos;Import Project$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props Conditionexists(apos;$(UserRootDir)\Microsoft.Cpp.$(Platform).user.propsapos;) LabelLocalAppDataPlatform/Import Project$(QtMsBuild)\Qt.props//ImportGroupItemDefinitionGroup Conditionapos;$(Configuration)|$(Platform)apos; apos;Release|x64apos; LabelConfigurationClCompileTreatWChar_tAsBuiltInTypetrue/TreatWChar_tAsBuiltInTypeMultiProcessorCompilationtrue/MultiProcessorCompilationDebugInformationFormatNone/DebugInformationFormatOptimizationMaxSpeed/Optimization/ClCompileLinkSubSystemConsole/SubSystemGenerateDebugInformationfalse/GenerateDebugInformation/Link/ItemDefinitionGroup /Project#include iostream #include tinyxml/tinyxml2.hint main() { #if 0 // 写入tinyxml2::XMLDocument xml;xml.Parse(?xml version\1.0\ encoding\UTF-8\?);tinyxml2::XMLElement* rootNode xml.NewElement(Project);rootNode-SetAttribute(DefaultTargets, Build);rootNode-SetAttribute(ToolsVersion, 15.0);rootNode-SetAttribute(xmlns, http://schemas.microsoft.com/developer/msbuild/2003);xml.InsertEndChild(rootNode);{tinyxml2::XMLElement *element_ItemGroup xml.NewElement(ItemGroup);element_ItemGroup-SetAttribute(Label, ProjectConfigurations);rootNode-InsertEndChild(element_ItemGroup);{tinyxml2::XMLElement *element_ProjectConfiguration xml.NewElement(ProjectConfigurations);element_ProjectConfiguration-SetAttribute(Include, Debug|X64);element_ItemGroup-InsertEndChild(element_ProjectConfiguration);{tinyxml2::XMLElement *element_ProjectConfiguration_Configuration xml.NewElement(Configuration);element_ProjectConfiguration_Configuration-InsertNewText(Debug);element_ProjectConfiguration-InsertEndChild(element_ProjectConfiguration_Configuration);}{tinyxml2::XMLElement *element_ProjectConfiguration_Platform xml.NewElement(Platform);element_ProjectConfiguration_Platform-InsertNewText(x64);element_ProjectConfiguration-InsertEndChild(element_ProjectConfiguration_Platform);}}{tinyxml2::XMLElement *element_ProjectConfiguration xml.NewElement(ProjectConfiguration);element_ProjectConfiguration-SetAttribute(Include, Release|X64);element_ItemGroup-InsertEndChild(element_ProjectConfiguration);{ tinyxml2::XMLElement *element_ProjectConfiguration_Configuration xml.NewElement(Configuration);element_ProjectConfiguration_Configuration-InsertNewText(Release);element_ProjectConfiguration-InsertEndChild(element_ProjectConfiguration_Configuration);}{tinyxml2::XMLElement *element_ProjectConfiguration_Platform xml.NewElement(Platform);element_ProjectConfiguration_Platform-InsertNewText(x64);element_ProjectConfiguration-InsertEndChild(element_ProjectConfiguration_Platform);}}}{tinyxml2::XMLElement *element_Import xml.NewElement(Import);element_Import-SetAttribute(Project, $(VCTargetsPath)\\Microsoft.Cpp.Default.props);rootNode-InsertEndChild(element_Import);}{tinyxml2::XMLElement *element_Import xml.NewElement(Import);element_Import-SetAttribute(Project, $(VCTargetsPath)\\Microsoft.Cpp.props);rootNode-InsertEndChild(element_Import);}{tinyxml2::XMLElement *element_ImportGroup xml.NewElement(ImportGroup);element_ImportGroup-SetAttribute(Condition, Exists($(QtMsBuild)\\qt_defaults.props));{tinyxml2::XMLElement *element_Import xml.NewElement(Import);element_Import-SetAttribute(Project, $(QtMsBuild)\\qt_defaults.props);element_ImportGroup-InsertEndChild(element_Import);}rootNode-InsertEndChild(element_ImportGroup);}{tinyxml2::XMLElement *element_PropertyGroup xml.NewElement(PropertyGroup);element_PropertyGroup-SetAttribute(Condition, $(Configuration)|$(Platform) Debug|x64);element_PropertyGroup-SetAttribute(Label, QtSettings);{{tinyxml2::XMLElement *element_QtInstall xml.NewElement(QtInstall);element_QtInstall-InsertNewText(5.12.4(64));element_PropertyGroup-InsertEndChild(element_QtInstall);}{tinyxml2::XMLElement *element_QtModules xml.NewElement(QtModules);element_QtModules-InsertNewText(core;gui;widgets;network;);element_PropertyGroup-InsertEndChild(element_QtModules);}{tinyxml2::XMLElement *element_QtBuildConfig xml.NewElement(QtBuildConfig);element_QtBuildConfig-InsertNewText(debug);element_PropertyGroup-InsertEndChild(element_QtBuildConfig);}}rootNode-InsertEndChild(element_PropertyGroup);}{tinyxml2::XMLElement *element_Target xml.NewElement(Target);element_Target-SetAttribute(Name, QtMsBuildNotFound);element_Target-SetAttribute(BeforeTargets, CustomBuild;ClCompile);element_Target-SetAttribute(Condition, !Exists($(QtMsBuild)\\qt.targets) or !Exists($(QtMsBuild)\\qt.props));{tinyxml2::XMLElement *element_Message xml.NewElement(Message);element_Message-SetAttribute(Importance, High);element_Message-SetAttribute(Text, QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly.);element_Target-InsertEndChild(element_Message);}rootNode-InsertEndChild(element_Target);}{tinyxml2::XMLElement *element_ImportGroup xml.NewElement(ImportGroup);element_ImportGroup-SetAttribute(Label, ExtensionSettings);rootNode-InsertEndChild(element_ImportGroup);}{tinyxml2::XMLElement *element_ImportGroup xml.NewElement(ImportGroup);element_ImportGroup-SetAttribute(Label, Shared);rootNode-InsertEndChild(element_ImportGroup);}{tinyxml2::XMLElement *element_ImportGroup xml.NewElement(ImportGroup);element_ImportGroup-SetAttribute(Label, PropertySheets);element_ImportGroup-SetAttribute(Condition, $(Configuration)|$(Platform) Debug|x64);rootNode-InsertEndChild(element_ImportGroup);{tinyxml2::XMLElement *element_Import xml.NewElement(Import);element_Import-SetAttribute(Project, $(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props);element_Import-SetAttribute(Condition, exists($(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props));element_Import-SetAttribute(Label, LocalAppDataPlatform);element_ImportGroup-InsertEndChild(element_Import);}{tinyxml2::XMLElement *element_Import xml.NewElement(Import);element_Import-SetAttribute(Project, $(QtMsBuild)\\Qt.props);element_ImportGroup-InsertEndChild(element_Import);}}{tinyxml2::XMLElement *element_ItemDefinitionGroup xml.NewElement(ItemDefinitionGroup);element_ItemDefinitionGroup-SetAttribute(Condition, $(Configuration)|$(Platform) Release|x64);element_ItemDefinitionGroup-SetAttribute(Label, Configuration);{{tinyxml2::XMLElement *element_ClCompile xml.NewElement(ClCompile);element_ItemDefinitionGroup-InsertEndChild(element_ClCompile);{tinyxml2::XMLElement *element_TreatWChar_tAsBuiltInType xml.NewElement(TreatWChar_tAsBuiltInType);element_TreatWChar_tAsBuiltInType-InsertNewText(true);element_ClCompile-InsertEndChild(element_TreatWChar_tAsBuiltInType);}{tinyxml2::XMLElement *element_TreatWChar_MultiProcessorCompilation xml.NewElement(MultiProcessorCompilation);element_TreatWChar_MultiProcessorCompilation-InsertNewText(true);element_ClCompile-InsertEndChild(element_TreatWChar_MultiProcessorCompilation);}{tinyxml2::XMLElement *element_DebugInformationFormat xml.NewElement(DebugInformationFormat);element_DebugInformationFormat-InsertNewText(None);element_ClCompile-InsertEndChild(element_DebugInformationFormat);}{tinyxml2::XMLElement *element_Optimization xml.NewElement(Optimization);element_Optimization-InsertNewText(MaxSpeed);element_ClCompile-InsertEndChild(element_Optimization);}}{tinyxml2::XMLElement *element_Link xml.NewElement(Link);element_ItemDefinitionGroup-InsertEndChild(element_Link);{tinyxml2::XMLElement *element_SubSystem xml.NewElement(SubSystem);element_SubSystem-InsertNewText(Console);element_Link-InsertEndChild(element_SubSystem);}{tinyxml2::XMLElement *element_GenerateDebugInformation xml.NewElement(GenerateDebugInformation);element_GenerateDebugInformation-InsertNewText(false);element_Link-InsertEndChild(element_GenerateDebugInformation);}}}rootNode-InsertEndChild(element_ItemDefinitionGroup);}xml.SaveFile(./temp_behaviac.xml);xml.Clear();system(pause);return 0; }代码读取xml int main() {tinyxml2::XMLDocument xml;tinyxml2::XMLError errXml xml.LoadFile(./temp_behaviac.xml);if (tinyxml2::XML_SUCCESS errXml){tinyxml2::XMLElement* root xml.RootElement();if (root){std::cout root-Value() DefaultTargets root-Attribute(DefaultTargets) ToolsVersion root-Attribute(ToolsVersion) xmlns root-Attribute(xmlns) std::endl;tinyxml2::XMLElement *XMLElement_ItemGroup root-FirstChildElement();if (XMLElement_ItemGroup){std::cout \t XMLElement_ItemGroup-Value() Label XMLElement_ItemGroup-Attribute(Label) std::endl;{tinyxml2::XMLElement *XMLElement_ProjectConfigurations XMLElement_ItemGroup-FirstChildElement();if (!XMLElement_ProjectConfigurations) { return -1; }std::cout \t\t XMLElement_ProjectConfigurations-Value() Include XMLElement_ProjectConfigurations-Attribute(Include) std::endl;{tinyxml2::XMLElement *XMLElement_Configuration XMLElement_ProjectConfigurations-FirstChildElement();if (!XMLElement_Configuration) { return -1; }std::cout \t\t\t XMLElement_Configuration-Value() XMLElement_Configuration-GetText() std::endl;tinyxml2::XMLElement *XMLElement_Platform XMLElement_Configuration-NextSiblingElement();if (!XMLElement_Platform) { return -1; }std::cout \t\t\t XMLElement_Platform-Value() XMLElement_Platform-GetText() std::endl;}tinyxml2::XMLElement *XMLElement_ProjectConfiguration XMLElement_ProjectConfigurations-NextSiblingElement();if (!XMLElement_ProjectConfiguration) { return -1; }std::cout \t\t XMLElement_ProjectConfiguration-Value() Include XMLElement_ProjectConfiguration-Attribute(Include) std::endl;{tinyxml2::XMLElement *XMLElement_Configuration XMLElement_ProjectConfiguration-FirstChildElement();if (!XMLElement_Configuration) { return -1; }std::cout \t\t\t XMLElement_Configuration-Value() XMLElement_Configuration-GetText() std::endl;tinyxml2::XMLElement *XMLElement_Platform XMLElement_Configuration-NextSiblingElement();if (!XMLElement_Platform) { return -1; }std::cout \t\t\t XMLElement_Platform-Value() XMLElement_Platform-GetText() std::endl;}}tinyxml2::XMLElement *XMLElement_Import XMLElement_ItemGroup-NextSiblingElement();if (!XMLElement_Import) { return -1; }std::cout \t XMLElement_Import-Value() Project XMLElement_Import-Attribute(Project) std::endl;tinyxml2::XMLElement *XMLElement_Import2 XMLElement_Import-NextSiblingElement();if (!XMLElement_Import2) { return -1; }std::cout \t XMLElement_Import2-Value() Project XMLElement_Import2-Attribute(Project) std::endl;tinyxml2::XMLElement *XMLElement_ImportGroup XMLElement_Import2-NextSiblingElement();if (!XMLElement_ImportGroup) { return -1; }std::cout \t XMLElement_ImportGroup-Value() Condition XMLElement_ImportGroup-Attribute(Condition) std::endl;{tinyxml2::XMLElement *XMLElement_Import XMLElement_ImportGroup-FirstChildElement();if (!XMLElement_Import) { return -1; }std::cout \t\t XMLElement_Import-Value() Project XMLElement_Import-Attribute(Project) std::endl;}tinyxml2::XMLElement *XMLElement_PropertyGroup XMLElement_ImportGroup-NextSiblingElement();if (!XMLElement_PropertyGroup) { return -1; }std::cout \t XMLElement_PropertyGroup-Value() Condition XMLElement_PropertyGroup-Attribute(Condition) Label XMLElement_PropertyGroup-Attribute(Label) std::endl;{tinyxml2::XMLElement *XMLElement_QtInstall XMLElement_PropertyGroup-FirstChildElement();if (!XMLElement_QtInstall) { return -1; }std::cout \t\t XMLElement_QtInstall-Value() XMLElement_QtInstall-GetText() std::endl;tinyxml2::XMLElement *XMLElement_QtModules XMLElement_QtInstall-NextSiblingElement();if (!XMLElement_QtModules) { return -1; }std::cout \t\t XMLElement_QtModules-Value() XMLElement_QtModules-GetText() std::endl;tinyxml2::XMLElement *XMLElement_QtBuildConfig XMLElement_QtModules-NextSiblingElement();if (!XMLElement_QtBuildConfig) { return -1; }std::cout \t\t XMLElement_QtBuildConfig-Value() XMLElement_QtBuildConfig-GetText() std::endl;}tinyxml2::XMLElement *XMLElement_Target XMLElement_PropertyGroup-NextSiblingElement();if (!XMLElement_Target) { return -1; }std::cout \t XMLElement_Target-Value() Name XMLElement_Target-Attribute(Name) BeforeTargets XMLElement_Target-Attribute(BeforeTargets) Condition XMLElement_Target-Attribute(Condition) std::endl;{tinyxml2::XMLElement *XMLElement_Message XMLElement_Target-FirstChildElement();if (!XMLElement_Message) { return -1; }std::cout \t\t XMLElement_Message-Value() Importance XMLElement_Message-Attribute(Importance) Text XMLElement_Message-Attribute(Text) std::endl;}tinyxml2::XMLElement *XMLElement_ImportGroup1 XMLElement_Target-NextSiblingElement();if (!XMLElement_ImportGroup1) { return -1; }std::cout \t XMLElement_ImportGroup1-Value() Label XMLElement_ImportGroup1-Attribute(Label) std::endl;tinyxml2::XMLElement *XMLElement_ImportGroup2 XMLElement_ImportGroup1-NextSiblingElement();if (!XMLElement_ImportGroup2) { return -1; }std::cout \t XMLElement_ImportGroup2-Value() Label XMLElement_ImportGroup2-Attribute(Label) std::endl;tinyxml2::XMLElement *XMLElement_ImportGroup3 XMLElement_ImportGroup2-NextSiblingElement();if (!XMLElement_ImportGroup3) { return -1; }std::cout \t XMLElement_ImportGroup3-Value() Label XMLElement_ImportGroup3-Attribute(Label) Condition XMLElement_ImportGroup3-Attribute(Condition) std::endl;{tinyxml2::XMLElement *XMLElement_Import XMLElement_ImportGroup3-FirstChildElement();if (!XMLElement_Import) { return -1; }std::cout \t\t XMLElement_Import-Value() Project XMLElement_Import-Attribute(Project) Condition XMLElement_Import-Attribute(Condition) Label XMLElement_Import-Attribute(Label) std::endl;tinyxml2::XMLElement *XMLElement_Import2 XMLElement_Import-NextSiblingElement();if (!XMLElement_Import2) { return -1; }std::cout \t\t XMLElement_Import2-Value() Project XMLElement_Import2-Attribute(Project) std::endl;}tinyxml2::XMLElement *XMLElement_ItemDefinitionGroup XMLElement_ImportGroup3-NextSiblingElement();if (!XMLElement_ItemDefinitionGroup) { return -1; }std::cout \t XMLElement_ItemDefinitionGroup-Value() Condition XMLElement_ItemDefinitionGroup-Attribute(Condition) Label XMLElement_ItemDefinitionGroup-Attribute(Label) std::endl;{tinyxml2::XMLElement *XMLElement_ClCompile XMLElement_ItemDefinitionGroup-FirstChildElement();if (!XMLElement_ClCompile) { return -1; }std::cout \t XMLElement_ClCompile-Value() std::endl;{tinyxml2::XMLElement *XMLElement_TreatWChar_tAsBuiltInType XMLElement_ClCompile-FirstChildElement();if (!XMLElement_TreatWChar_tAsBuiltInType) { return -1; }std::cout \t\t XMLElement_TreatWChar_tAsBuiltInType-Value() XMLElement_TreatWChar_tAsBuiltInType-GetText() std::endl;tinyxml2::XMLElement *XMLElement_MultiProcessorCompilation XMLElement_TreatWChar_tAsBuiltInType-NextSiblingElement();if (!XMLElement_MultiProcessorCompilation) { return -1; }std::cout \t\t XMLElement_MultiProcessorCompilation-Value() XMLElement_MultiProcessorCompilation-GetText() std::endl;tinyxml2::XMLElement *XMLElement_DebugInformationFormat XMLElement_MultiProcessorCompilation-NextSiblingElement();if (!XMLElement_DebugInformationFormat) { return -1; }std::cout \t\t XMLElement_DebugInformationFormat-Value() XMLElement_DebugInformationFormat-GetText() std::endl;tinyxml2::XMLElement *XMLElement_Optimization XMLElement_DebugInformationFormat-NextSiblingElement();if (!XMLElement_Optimization) { return -1; }std::cout \t\t XMLElement_Optimization-Value() XMLElement_Optimization-GetText() std::endl;}tinyxml2::XMLElement *XMLElement_Link XMLElement_ClCompile-NextSiblingElement();if (!XMLElement_Link) { return -1; }std::cout \t XMLElement_Link-Value() std::endl;{tinyxml2::XMLElement *XMLElement_SubSystem XMLElement_Link-FirstChildElement();if (!XMLElement_SubSystem) { return -1; }std::cout \t\t XMLElement_SubSystem-Value() XMLElement_SubSystem-GetText() std::endl;tinyxml2::XMLElement *XMLElement_GenerateDebugInformation XMLElement_SubSystem-NextSiblingElement();if (!XMLElement_GenerateDebugInformation) { return -1; }std::cout \t\t XMLElement_GenerateDebugInformation-Value() XMLElement_GenerateDebugInformation-GetText() std::endl;}}}}root nullptr;}system(pause);return 0; }笔者 笔者 - jxd
http://www.zqtcl.cn/news/706736/

相关文章:

  • 谷歌网站 百度清苑住房和城乡建设局网站
  • 南宁世尊商贸网站建设如何查看一个网站是否备案
  • h5手机网站怎么做搜索引擎关键词怎么选
  • 弱电网站源码工程造价建设信息网站
  • 村级网站模板做公司永久免费网站什么好
  • 厦门做网站培训安康市电梯公司
  • 江苏水利建设网站排行榜百度
  • 营销导向的企业网站优化wordpress制作企业
  • 株洲网站建设公司wordpress资讯类主题破解版
  • 网站导航栏设计要求wordpress直达按钮
  • 网站建设寻找可以途径网站制作的目的
  • 私募基金网站建设wordpress快讯插件
  • 无锡网站搜索引擎优化校园二级网站建设
  • 用vps刷网站流量要怎么做云主机开网站教程
  • 个体户经营异常如何网上解除深圳seo云哥
  • 网站建设科研申报书沧州网站建设定制价格
  • 家纺营销型网站wordpress演示数据
  • 中卫建设厅网站中国纪检监察报
  • 网站建设费如何核算如何给网站做权重
  • 东莞营销型高端网站建设网页专题设计
  • 神兵网站建设互联网个人用户网站
  • 类似视频教程网站的wordpress主题网页设计用什么尺寸的画布好
  • 仿模板电影网站线上销售的方法和技巧
  • 漳州建设银行网站首页速成建站
  • 网站建立的链接不安全怎么解决学校网站怎样建设
  • 信阳市工程建设信息网站wordpress段子
  • 网站建设和网络搭建是一回事吗长沙网站搭建优化
  • 基础网站怎么做石景山公司
  • 吉他谱网站如何建设wordpress主题字体用隶书
  • 做一个宣传网站的策划书自己怎样推广呢