I am facing a n00b issue in .NET webservices. the WebMethod return type is encoding an already encoded string (already encoded by my xml writer).
Is there a way to turn of this off?
Example the prepared xml before the webmethod returns it <p> Hello World </p>
but the xml received by the client from the webmethod response &开发者_如何学编程lt;p> Hello World </P>
the ampersand is getting encoded by the web method
I am using xmlwriter object to build the xml... has anyone a solution to this?
I'm guessing you're sending this to a webpage. What you're getting is the encoding to show the actual '<' characters on the screen and not the HTML reserved characters.
These '<' '>' are reserved characters in a HTML page for the HTML parsers to use. If you want to use them in your page, you use < (lesser than) > (greater than).
Try putting a '\' in front of each of your HTML reserved character. This is a guess, I'm not sure that it'll work.
精彩评论