Will WCF automatically encode my XML conent?
E.g. the WCF Service creates an XDocument with an element like this:
string content = <Wibble>";
XDocument message = new XDocument( new XELement("ElName", content) );开发者_StackOverflow社区
Our clients are stating that they get the above back as:
<ElName><Wibble></ElName>
We've not found any decode code in our WCF service or their client code. I think we're missing something, though could it be that WCF or XDocument is turning <Wibble>
into <Wibble>
? Note that we're using Net TCP binary encoding.
Thanks
This was happening when we called InnerText rather than InnerXml on an XmlDocument element. It seems that calling InnerText returns decoded XML.
精彩评论