0

I have a object return in a WCF and when I do an xml over http the response will look like:

<person>
  <name>Hello</name>
</person

I need it to look like

<?xml version="1.0" encoding="UTF-8"?>
<pre:person>
  <name>Hello</name>
</pre:person>

Is there an easy way to do it in C#?

4

1 回答 1

0

浏览这篇文章可能会帮助您更改 WCF 服务的 XML 响应中的前缀

或者你可以尝试返回XElement

于 2012-08-08T04:51:30.683 回答