XML structure doesn't really matter. It's what you set on the roAssociativeArray object that you pass as content. In Gabby, our video code does something like this:
This is part of a larger function. Hopefully, this is enough context for you to decipher/understand.
createContentItem:
content = {}
if isVideo then
content.minBandwidth = 20
content.StreamQualities = CreateObject("roArray", 5, true)
content.StreamBitrates = CreateObject("roArray", 5, true)
content.StreamUrls = CreateObject("roArray", 5, true)
else
if e.Length <> invalid then
if type(e.Length) = "roString" and len(e.Length) > 0 then
content.Length = e.Length
end if
end if
endif
content.Tag = e.Tag
content.Url = e.Url
content.Title = e.Title
content.Artist = e.Artist
content.Album = e.Album
content.Description = e.Description
content.HDPosterURL = e.HDPosterURL
content.SDPosterURL = e.SDPosterURL
content.StreamFormat = e.StreamFormat
content.ContentType = e.ContentType
content.ReleaseDate = e.ReleaseDate
content.ContentId = e.ContentId
content.ContentQuality = e.ContentQuality
content.StartPosition = e.StartPosition
'image attributes
content.ImageTitle = e.ImageTitle
content.CameraManufacturer = e.CameraManufacturer
content.CameraModel = e.CameraModel
content.DTOrig = e.DTOrig
content.Copyright = e.Copyright
content.ImageFilename = e.ImageFilename
content.ImageShortFilename = e.ImageShortFilename
content.ImagePeriod = e.ImagePeriod
content.OverlayPeriod = e.OverlayPeriod
if isVideo then
content.SubtitleUrl = e.SubtitleUrl
content.EpisodeNumber = e.EpisodeNumber
content.IsHD = e.IsHD
content.HDBranded = e.HDBranded
'media may be at multiple bitrates, so parse an build arrays
for idx = 0 to 4
content.StreamBitrates[idx] = e.StreamBitrates[idx]
content.StreamQualities[idx] = e.StreamQualities[idx]
content.StreamUrls[idx] = e.StreamUrls[idx]
next idx
endif
return content