Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear All,

I am tring to return list of object such as :
List<Mail> Mails = FillList();
return Mails;

where Mail class look like:

public class Mail
{
public int Mail_ID { get; set; }
public string MailName { get; set; }
public string MailHeader { get; set; }
public string AttachmentURL { get; set; }
}

and get the result like:

HTML
<ArrayOfMail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SANG_Service.Models">
<Mail>
<AttachmentURL>http://localhost:61485/images/1.jpg</AttachmentURL>
<MailHeader>Header1</MailHeader>
<MailName>Name1</MailName>
<Mail_ID>1</Mail_ID>
</Mail>
</ArrayOfMail>


Now the question is: how to remove
HTML
xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SANG_Service.Models"


From the first note ?
Posted
Updated 23-Mar-21 5:19am
v2
Comments
Sergey Alexandrovich Kryukov 14-Jun-13 12:38pm    
Why removing it?! If you remove it, "i" prefixes won't work. Don't do it.
—SA

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900