How do I stop the ampersand at the beginning of a character entity from being escaped?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Im working with an XML document and I need to insert some special characters. <br/><br/>The process is simple: I create a text element, add the special chars, add the element to the document and then save it.<br/><br/>The entity Im adding is (for example) an apostrophe , so Im adding &#39;<br/><br/>If I trace the code, this appears to work correctly, however, when I open the saved document, what I find is: &amp;#39;<br/><br/>Something, somewhere has helpfully escaped that leading ampersand, completely mangling the reference.<br/><br/>Does anyone know why this is happening, and how I can stop it?<br/><br/>Many thanks in advance for any assistance.<br/><br/>Jude Fisher<br/><br/>http://www.jcfx.eu<br/><br/>

View the full article
 
Back
Top