Display data from an xml file in sharepoint

In this Posts you will learn how to quickly create a custom page in SharePoint designer 2010 and display some data from an xml file without writing any code.

1. Open SharePoint Designer 2010.
2. On the left-hand navigation list, click Site Pages. This opens the default Site Pages page which enables you to manage permissions for specific sites, preview the page in a browser, check in and check out the site page for editing, and so on.
3. On the ribbon, click Web Part Page to create a new Web part page. Rename the new page that is created for you to OurPage.aspx.
4. Right-click OurPage.aspx, and select Check Out. This marks the file as locked exclusively by you for editing.
5. After you check out the file, click the link to open the Properties pane.
6. Under Customization, click Edit File.
7. Click Code to change the view to code view.
8. Add a set of <div> tags within which you will add an ASP.NET control.
9. In the Toolbox, under the Standard ASP.NET controls, drag and drop the XML control to the Site Page Designer between the <div> tags you just added and rename the default ID to OurPageXML.
10. Click Design to change the view to design view.
11. Click the new XML control you added to the page, and then click the Tag Properties tab.
12. Under Behavior, you can upload a DocumentSource (an XML file that contains the data) and a TransformSource (XSLT that formats the XML data).
13. After you’ve uploaded the two files, click the Preview in Browser button to test out the look and feel of the XML file and style sheet formatting. You would see your xml file data in a grid like view.
14. Save and Check in the page and your Done!


Post a Comment

Popular Posts