How to exclude property name in Xml serialization in web api response
<p>I have a class named GetUnitResponse whose definition is as follows</p>

<pre>
public partial class GetUnitResponse
{
    [System.ServiceModel.MessageBodyMemberAttribute(Name = "GetUnitResponse", Namespace = "", Order = 0)]
    [System.Xml.Serialization.XmlArrayItemAttribute("Unit", IsNullable=false)]


    public UnitOut[]GetUnitResponse1;

    public GetUnitResponse()
    {
    }

    public GetUnitResponse(UnitOut[] GetUnitResponse1)
    {
        this.GetUnitResponse1 = GetUnitResponse1;
    }
}
</pre>

<p>I'm getting a following xml from the response(GetUnitResponse) object</p>

<pre><code>&lt;pre&gt;
&lt;GetUnitResponse xmlns:xsi="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;GetUnitResponse1&gt;
        &lt;Unit day="2016-01-27" ID="572"&gt;

        &lt;/Unit&gt;
        &lt;Unit day="2016-01-27" ID="573"&gt;

        &lt;/Unit&gt;
        &lt;Unit day="2016-01-27" ID="574"&gt;

        &lt;/Unit&gt;
        &lt;/GetUnitResponse1&gt;
&lt;/GetUnitResponse&gt;
&lt;/pre&gt;
</code></pre>

<p>Client wants the GetUnitResponse1 tag to be excluded and the resultant xml should be like below:</p>

<pre><code>&lt;pre&gt;
&lt;GetUnitResponse xmlns:xsi="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;    
        &lt;Unit day="2016-01-27" ID="572"&gt;

        &lt;/Unit&gt;
        &lt;Unit day="2016-01-27" ID="573"&gt;

        &lt;/Unit&gt;
        &lt;Unit day="2016-01-27" ID="574"&gt;

        &lt;/Unit&gt;     
&lt;/GetUnitResponse&gt;
&lt;/pre&gt;
</code></pre>

<p>How to achieve this ?</p>