Click here to Skip to main content
15,918,516 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i return xml from webservice .
i am doing this plz any one help
C#
[webmethod]
public string gertdata()
{
   xdocument xd=xdocument.load("path");
   var query from  p in xd.descendants("item")
   select new 
   {
     name=p.element("title").value;
   };
   return query.tosring();
}

how to modify get data method so that i can return xml.
in clieny call i want to do like this
C#
ds.writexml("path",xmlwritemode.writeschema);

i am trying this and not able to get that , i know i am returning string ,how to change getdata method.
Posted
Updated 20-Dec-11 18:44pm
v2
Comments
Orcun Iyigun 21-Dec-11 0:44am    
Tags added.

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