I am querying a sharepoint list like
<where><Field Ref Name='Title'/><Value type='Text'>A</value></where>
now I am creating a webpart where I want to create xml based on this query.I don’t know how to achieve this mainly I want sth like content query webpart like getting xml from querying a list and then apply xsl on it. Can anyone tell me how it can be possible??
Thanks,
Do you want to have the result set as XML? Then you should read these:
Lists.asmxweb service explanation with examples http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspxSPWebhas GetSiteData method that returnsDataTable. This can be easily translated into XML http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.getsitedata.aspxEDIT: to turn your
DataTableinto XML, you can add it to aDataSetand then callGetXml, something like this: