http://www.codelast.com/?p=883
<?xml version="1.0" ?>
<config>
<property>
<![CDATA[if(a<b){return 0;}]]>
</property>
</config>
-------------------------------
TiXmlDocument doc;
doc.LoadFile("/root/test.xml");
TiXmlElement* pRoot = doc.RootElement();
TiXmlElement* pProperty = pRoot->FirstChildElement();
std::string strCDATA = pProperty->FirstChild()->Value(); // strCDATA中就得到了 if(a<b){return 0;}
No comments:
Post a Comment