Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 740237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:29:33+00:00 2026-05-14T08:29:33+00:00

I have an XML to be rendered in sharepoint using a XSL file. I

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:29:33+00:00Added an answer on May 14, 2026 at 8:29 am

    Found out myself how to do it. 🙂

    The AddWebPart method of WebPartPagesweb 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:

    <WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2">
              <Assembly>Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
              <TypeName>Microsoft.SharePoint.WebPartPages.XmlWebPart</TypeName>
              <FrameType>None</FrameType>
              <Title>XML Web Part</Title>
              <XMLLink xmlns="http://schemas.microsoft.com/WebPart/v2/Xml">http://RootSite/sites/XYZ/Documents/ABC.xml</XMLLink>
              <XML xmlns="http://schemas.microsoft.com/WebPart/v2/Xml" />
              <XSLLink xmlns="http://schemas.microsoft.com/WebPart/v2/Xml">http://RootSite/sites/XYZ/Documents/ABC.xsl</XSLLink>
              <XSL xmlns="http://schemas.microsoft.com/WebPart/v2/Xml" />
              <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/Xml" />
    </WebPart>
    

    And pass this Xml string to the AddWebPart Method:

    public static Guid WebPartPagesAddWebPart(string PageUrl, string WebPartXml, uint Storage)
            {
                // proxy object to call the Versions web service
                WebPartPages.WebPartPagesWebService WebPartPagesWebService = new WebPartPages.WebPartPagesWebService();
    
                // the user credentials to use
                WebPartPagesWebService.Credentials = new NetworkCredential(UserName, Password, Domain);
                WebPartPagesWebService.Url = sharePointHost + WebPartPagesServiceName;
    
                // add the new web part to the page
                Guid Result = WebPartPagesWebService.AddWebPart(PageUrl, WebPartXml, (WebPartPages.Storage)Storage);
    
                // dispose the web service object
                WebPartPagesWebService.Dispose();
                return Result;
            }
    

    The MSDN help only gave a example for ContentEditor web part. I searched a bit and modified it for Xml web part. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML object (loaded using XMLHTTPRequest 's responseXML ). I have modified
I have an ActiveRecord model that I would like to convert to xml, but
Is it possible to have XML-embedded JavaScript executed to assist in client-side (browser-based) XSL
So I have xml that looks like this: <todo-list> <id type=integer>#{id}</id> <name>#{name}</name> <description>#{description}</description> <project-id
Greetings! If I have XML such as this: <Root> <AlphaSection> . . . </AlphaSection>
I have this xml feed in Chinese, which NSXLParsers is unable to parse. It
I'm new to Spring MVC and have the following situation: In WEB-INF/demoshop-servlet.xml I have
I have xml where some of the element values are unicode characters. Is it
I have xml files I want to read in and store in the database.
I have XML files in a directory that I wish to get over to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.