ASPX templates
Version 5.x > ASPX templates > XmlDataSource and XmlRepeater controls View modes: 
User avatar
Member
Member
benjamin-codegecko - 6/7/2011 12:18:46 PM
   
XmlDataSource and XmlRepeater controls
Hi there,

I'm trying to get an XmlRepeater to bind to an XmlDataSource to consume an XML feed.
Here's my code.
<cms:XMLDataSource ID="xdsVimeo" runat="server"
XmlUrl="http://vimeo.com/api/v2/user6962207/videos.xml"
TableName="videos" />
<cms:XMLRepeater ID="xrpVimeo" runat="server"
DataSourceName="xdsVimeo"
DataBindByDefault="true"
HideControlForZeroRows="false">
<HeaderTemplate>
<ul class="vimeocolumn threecolumn">
</HeaderTemplate>
<ItemTemplate>
...
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</cms:XMLRepeater>

To my mind these should work rather fluidly together, my XML should be retrieved, dumped into the internal datatable, for me to then bind to my XmlRepeater.
However, my datasource seems to return zero records - at least, the repeater comes back with zero records being bound to it.
Where am I going wrong?
Pointers appreciated - I don't want code answers, just some instruction on what these controls should do, as the documentation and howtos are rather sparse.


Many thanks,

Benjamin

User avatar
Kentico Support
Kentico Support
kentico_radekm - 6/13/2011 3:57:14 AM
   
RE:XmlDataSource and XmlRepeater controls
Hello Benjamin.

At first, what build number are you using, please? There was a bug in XMLDataSource web part, so I would recommend you to apply the latest hotfix for 5.5R2. Just to be sure...

Anyway, I believe that the main problem in your case is missing "Transformation name" property in your XMLRepeater control. Could you please try to add this property within and point it to proper transformation name? Thank you.

Best Regards,
Radek Macalik