How do I return pure XML from asmx web service?

Posted by User on Stack Overflow See other posts from Stack Overflow or by User
Published on 2010-05-06T21:59:30Z Indexed on 2010/05/06 23:38 UTC
Read the original article Hit count: 259

I want an asmx webservice with a method GetPeople() that returns the following XML (NOT a SOAP response):

<People>

    <Person>
        <FirstName>Sara</FirstName>
        <LastName>Smith</LastName>
    </Person>

    <Person>
        <FirstName>Bill</FirstName>
        <LastName>Wilson</LastName>
    </Person>

<People/>

How can I do this?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asmx