Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > XML Data Source - Basic Repeater - Transformation problem View modes: 
User avatar
Member
Member
dchaffin-dreamcc - 3/15/2012 2:31:46 PM
   
XML Data Source - Basic Repeater - Transformation problem
I'm pulling in a list of videos on a playlist on YouTube through their API. I seem to have data coming in, but I am unable to get all the fields out of the data.

I'm using an XML Data Source and a Basic Repeater.

Here is an example of one of the "entry" nodes:
<entry>
<id>http://gdata.youtube.com/feeds/api/playlists/0A4DE2FB25C19994/PL1IolYy-_inl68eaF3yP0WdPiRtK8Mna4</id>
<updated>2012-03-15T18:11:30.893Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#playlist'/>
<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='Education' label='Education'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='WVU Healthcare'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='West Virginia University'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='WVU'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Morgantown'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='wv'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='WVUH'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='WVU Hospitals'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='shoulder overuse injury'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='shoulder exercise'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='George Bal'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='M.D.'/>
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='Rolly Sullivan'/>
<title type='text'>Shoulder Injury — WVU Health Report</title>
<content type='text'>Your shoulders carry a lot of weight. You rely on them from everything from shoveling snow to combing your hair. But over use can result in a painful immobilizing injury.

In this WVU Health Report, Dr. Rolly Sullivan explains how to prevent one of the more common shoulder injuries—shoulder overuse injury.</content>
<link rel='alternate' type='text/html' href='https://www.youtube.com/watch?v=Y1LFimpTzlg&feature=youtube_gdata'/>
<link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/Y1LFimpTzlg/responses'/>
<link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/Y1LFimpTzlg/related'/>
<link rel='http://gdata.youtube.com/schemas/2007#mobile' type='text/html' href='https://m.youtube.com/details?v=Y1LFimpTzlg'/>
<link rel='related' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/videos/Y1LFimpTzlg'/>
<link rel='self' type='application/atom+xml' href='https://gdata.youtube.com/feeds/api/playlists/0A4DE2FB25C19994/PL1IolYy-_inl68eaF3yP0WdPiRtK8Mna4'/>
<author>
<name>wvuhealthcare</name>
<uri>https://gdata.youtube.com/feeds/api/users/wvuhealthcare</uri>
</author>
<gd:comments>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#comments' href='https://gdata.youtube.com/feeds/api/videos/Y1LFimpTzlg/comments' countHint='0'/>
</gd:comments>
<yt:hd/>
<media:group>
<media:category label='Education' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>Education</media:category>
<media:content url='rtsp://v5.cache2.c.youtube.com/CiULENy73wIaHAlYzlNqisVSYxMYDSANFEgGUglwbGF5bGlzdHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' isDefault='true' expression='full' duration='95' yt:format='1'/>
<media:content url='rtsp://v8.cache4.c.youtube.com/CiULENy73wIaHAlYzlNqisVSYxMYESARFEgGUglwbGF5bGlzdHMM/0/0/0/video.3gp' type='video/3gpp' medium='video' expression='full' duration='95' yt:format='6'/>
<media:description type='plain'>Your shoulders carry a lot of weight. You rely on them from everything from shoveling snow to combing your hair. But over use can result in a painful immobilizing injury.

In this WVU Health Report, Dr. Rolly Sullivan explains how to prevent one of the more common shoulder injuries—shoulder overuse injury.</media:description>
<media:keywords>WVU Healthcare, West Virginia University, WVU, Morgantown, wv, WVUH, WVU Hospitals, shoulder overuse injury, shoulder exercise, George Bal, M.D., Rolly Sullivan</media:keywords>
<media:player url='https://www.youtube.com/watch?v=Y1LFimpTzlg&feature=youtube_gdata_player'/>
<media:thumbnail url='http://i.ytimg.com/vi/Y1LFimpTzlg/0.jpg' height='360' width='480' time='00:00:47.500'/>
<media:thumbnail url='http://i.ytimg.com/vi/Y1LFimpTzlg/1.jpg' height='90' width='120' time='00:00:23.750'/>
<media:thumbnail url='http://i.ytimg.com/vi/Y1LFimpTzlg/2.jpg' height='90' width='120' time='00:00:47.500'/>
<media:thumbnail url='http://i.ytimg.com/vi/Y1LFimpTzlg/3.jpg' height='90' width='120' time='00:01:11.250'/>
<media:title type='plain'>Shoulder Injury — WVU Health Report</media:title>
<yt:duration seconds='95'/>
</media:group>
<yt:noembed/>
<yt:statistics favoriteCount='0' viewCount='30'/>
<yt:description>Your shoulders carry a lot of weight. You rely on them from everything from shoveling snow to combing your hair. But over use can result in a painful immobilizing injury.

In this WVU Health Report, Dr. Rolly Sullivan explains how to prevent one of the more common shoulder injuries—shoulder overuse injury.</yt:description>
<yt:position>1</yt:position>
</entry>

... and my first attempts at a transformation for this data is:
<%# Eval("id") %> : <%# Eval("updated") %> : <%# Eval("title") %>
<hr />

What I get for output is:

"http://gdata.youtube.com/feeds/api/playlists/0A4DE2FB25C19994/PL1IolYy-_inl68eaF3yP0WdPiRtK8Mna4 : 2012-03-15T19:38:04.590Z : "

In other words, it seems to be able to access the "id" and "updated" values, but not the "title" info. I have been all over these forums and Google looking for how to access the rest of this to no avail. Any help would be greatly appreciated!

Thanks!

User avatar
Member
Member
kentico_michal - 3/21/2012 2:35:10 AM
   
RE:XML Data Source - Basic Repeater - Transformation problem
Hello,

Could you please check the Event log [Site manager -> Administration -> Event log] if there are any logs related to this issue?

Would it be possible to post here an example of the complete XML document and the export of XML Data source properties.

Thank you.

Best regards,
Michal Legen

User avatar
Member
Member
vin4.net-gmail - 7/6/2012 8:11:04 AM
   
RE:XML Data Source - Basic Repeater - Transformation problem
Hi am facing problem in specifying the table name in the XML data source repeater.

I am trying read a xml file by spacing it in a folder under my project root. Added XML data source repeater on the page, specified the file path and added a basic repeater with data source control id and transformation for fetching data from the xml file.

But its not showing any data. I guess, need to specify the table name but I am not getting how to find out the table name.

Please help me to achieve this.

Thanks in advance.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 7/11/2012 11:28:47 AM
   
RE:XML Data Source - Basic Repeater - Transformation problem
Hi,

could you please answer the questions asked by Michal?

In the table property should be the root element of your xml file, for example books.

Best regards,
Ivana Tomanickova

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 7/11/2012 12:28:25 PM
   
RE:XML Data Source - Basic Repeater - Transformation problem
So is Dream Catcher Creative using Kentico now?

User avatar
Member
Member
dchaffin-dreamcc - 7/11/2012 1:09:39 PM
   
RE:XML Data Source - Basic Repeater - Transformation problem
@Jiveabillion - It's not our primary platform, but we like to stay flexible. In this case, our client already had a lot invested in Kentico, so we stayed with it. BTW, is this Jeff Samples? I don't believe we've ever met in person, but I'm trying to match the small thumbnail on the forum here with some other sources online.

-------------------------------------

RE: The initial question - I abandoned this development direction in favor of another method (at least for the time being), so I'm afraid I have no further input on the topic at the time.

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 7/11/2012 3:43:27 PM
   
RE:XML Data Source - Basic Repeater - Transformation problem
No, I'm not Jeff Samples. I used to work with him though.