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

xml

Solution

A single `&` is illegal in an XML document (outside of CDATA sections; see @rsp's answer), so this is not possible. If there is a verbatim ampersand in your node data, it has to be encoded as `&`.

But it's also no problem because any XML reader will decode `&` as a literal `&` when parsing the XML file.

Problem

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 anyone please tell me how can I achieve it? Result:

Original source

Related problems