How to Create a Custom XML Output using SharePoint Services 3.0
There are just few simple steps:
- Create a List
- Open SharePoint Designer 2007 and open a blank .aspx page.
- Delete all the code generated in .aspx page
- In the Task pane open the Data Source Library and click Show Data
- Select the Title field and than click Insert Selected Fields as … Multiple Item View
- In Change Layout select Plain List of Titles.
- Add XML declaration: <?xml version=”1.0″ encoding=”utf-8″ ?>
- Remove all HTML tags
- After <WebPartPages:DataFormWebPart runat=”server” add additional property SuppressWebPartChrome=”True” wich will prevent the chrome being displayed. In short: now <table> tags around the web part.
- Go to the <xsl:template section and replace the <p> tags with: <xsl:text disable-output-escaping=”yes”><Root></xsl:text> … – this will be the first node of the XML file. You will also need to end this tag.
- do the same for all other child nodes you want to display.
List in SharePoint:

XML Output:

For the source code go to www.robertkuzma.com.
-
rankandfile liked this
-
sharepointcms reblogged this from robertkuzma
-
robertkuzma posted this