XML Invalid characters when creating CData node from UnicodeString

后端 未结 3 1302
迷失自我
迷失自我 2021-01-07 01:51

IDE: Embarcadero XE5 c++ builder.

I\'m trying to dump UnicodeStrings in XML CData sections.

Small extract of such a string:

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-07 02:11

    Turns out the problem was indeed all the escape characters present in the raw data string, as suspected.

    Solved that by Base64-encoding the entire string before creating the XML CData-sections.

    Rad Studio methods: EncodeBase64, DecodeBase64

    Header: Soap.EncdDecd.hpp

提交回复
热议问题