我尝试到XML存储到string.Is在C真的可行++我得到一个copile错误:存储XML为字符串
error: parse error before string constant
试图如下写一行代码时:
string xmlString = "<animalList dnPrefix="String">
<node>
<animal ID="xxxxxxxx">
<Status>managed</Status>
<Type>ENB</Type>
<Subtype>0</Subtype>
<Version1>0.0</Version1>
<Version2>0.0</Version2>
<Name>ChicagoWest5678</Name>
<LocalName>ChicagoWest5678</LocalName>
</animal>
<animal ID ="yyyyyy">
<Status>managed</Status>
<Type>ENB</Type>
<Subtype>0</Subtype>
<Version1>0.0</Version1>
<Version2>0.0</Version2>
<Name>ChicagoWest5678</Name>
<LocalName>ChicagoWest5678</LocalName>
</animal>
</node>
</animalList> ";
有没有比它保存到文件等任何其他方式..我不能直接存储到一个字符串..Please就帮我的朋友...
,取决于您所使用XML做什么,你可能也想看看了Xerces库: http://xerces.apache.org/xerces-c/ – forsvarir 2011-04-19 07:45:48