I have an XML to be rendered in sharepoint using a XSL file. I now the how to do this using object model of sharepoint but don’t how to do this using sharepoint web services.
i.e. I want to create XML web parts using sharepoint web services.
Is it possible to do create XML web parts using sharepoint web services? If yes, how?
Found out myself how to do it. 🙂
The
AddWebPartmethod ofWebPartPagesweb service is the only method which can be used to add a web part and add it to a page too.You only need to prepare the Xml properly which needs to be passed to the methosd as a parameter. This XML determines the type of WebPart and it’s properties.
For Xml WebPArt, I used the following Xml:
And pass this Xml string to the
AddWebPartMethod:The MSDN help only gave a example for ContentEditor web part. I searched a bit and modified it for Xml web part. 🙂