Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/131.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用符号AND验证xml名称 我写了一个C++程序,把CSV文件转换成XML。我的CSV文件的一部分有一个城市名称,其中有一个符号和…当我将信息填充到XML中时,我无法验证我的代码。是否有一种方法来编码C++,以便XML即使在存在的情况下也能验证这个词…不确定是否正确吐出,请查看下面的 <cit:city> <cit:name> Inisa </cit:name> <cit:district> Oyo & Osun </cit:district> <cit:population> 119800 </cit:population> </cit:city>_C++_Xml_Validation_Csv - Fatal编程技术网

使用符号AND验证xml名称 我写了一个C++程序,把CSV文件转换成XML。我的CSV文件的一部分有一个城市名称,其中有一个符号和…当我将信息填充到XML中时,我无法验证我的代码。是否有一种方法来编码C++,以便XML即使在存在的情况下也能验证这个词…不确定是否正确吐出,请查看下面的 <cit:city> <cit:name> Inisa </cit:name> <cit:district> Oyo & Osun </cit:district> <cit:population> 119800 </cit:population> </cit:city>

使用符号AND验证xml名称 我写了一个C++程序,把CSV文件转换成XML。我的CSV文件的一部分有一个城市名称,其中有一个符号和…当我将信息填充到XML中时,我无法验证我的代码。是否有一种方法来编码C++,以便XML即使在存在的情况下也能验证这个词…不确定是否正确吐出,请查看下面的 <cit:city> <cit:name> Inisa </cit:name> <cit:district> Oyo & Osun </cit:district> <cit:population> 119800 </cit:population> </cit:city>,c++,xml,validation,csv,C++,Xml,Validation,Csv,不,您的输入不是XML,无法假装它是XML。更改程序,使其生成正确的XML。最好的方法是使用XML序列化库,而不是手工构建XML。我不知道C++的序列化库是什么,但我确信它们存在。你需要打开和进入;对于格式良好的XML。您可以将其包含在CDATA部分:哇,完全忘记CDATA了,谢谢。。。。 Errors in the XML document: 10990: 27 The entity name must immediately follow the '&' in the enti

不,您的输入不是XML,无法假装它是XML。更改程序,使其生成正确的XML。最好的方法是使用XML序列化库,而不是手工构建XML。我不知道C++的序列化库是什么,但我确信它们存在。

你需要打开和进入;对于格式良好的XML。您可以将其包含在CDATA部分:哇,完全忘记CDATA了,谢谢。。。。
Errors in the XML document: 
10990:  27  The entity name must immediately follow the '&' in the entity reference.