How to solve Ampersand (&) conversion issue in XML?

前端 未结 4 675
北恋
北恋 2021-01-21 06:07

I am creating XML file using XMLDocument, but when XML node get \'&\' as data, it converting in \"Ampersand(&)amp;\" but i need actual value that is \'&\', Can anyon

4条回答
  •  忘掉有多难
    2021-01-21 06:24

    If it is really necessary to have unescaped ampersands in your XML representation, you can use CDATA sections at the expense of the start and ]]> end around your character data.

提交回复
热议问题