开发者

Will WCF automatically encode my XML conent?

E.g. the WCF Service creates an XDocument with an element like this:

string content = <Wibble&gt";
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 &lt;Wibble&gt 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜