I've found a problem of tinyxml: when I encode string looks like hex-char-refer, for example "&#xtt", the result is wrong:
TiXmlElement *root_elem = new TiXmlElement("test");
output of this program is <test str="&#xTTT" />. It's invalid that most XMLParser would fail to parse it.
I traced the program, and I found that TiXmlBase::EncodeString causes this problem. The function will deal with hexadecimal-character-reference, and pass &#xTTT through unchanged.
So, my question is: why's that? Need to pass HCR though in TiXmlBase::EncodeString? And if I want to pack "&#xTTT" as PLAINTEXT, what should I do?
Thanks for any info on my question :)
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.