Why would XslCompiledTransform.Transform change the ampersand escape character into a normal ampersand character? RRS feed

  • Question

  • In the project I am currently working on, the code creates an XmlDocument whose text contains the ampersand escape character (&) and then uses this XmlDocument with an XslCompiledTransform object to create transformed output for an XmlTextWriter.  The strange thing is that in one particular instance, one of the ampersand escape characters gets changed into a regular ampersand character, causing an error later in the program due to the xml being invalid.  Is there some reason that the XslCompiledTransform (or whatever is the cause here) would change just one ampersand escape character into a normal one while leaving all of the others the same?  Thanks.

    Wednesday, October 31, 2012 4:02 PM