XML output from CMSBuilder

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 3, 2007   (RSS)

Re: [aev] XML output from CMSBuilder

By Dave - December 3, 2007

CMS Builder doesn't have extra fields (title, caption) for uploads yet. So the only way to do it would be to have lots of single file upload fields with 2 extra fields for each one for the Title and Creator. Then limit each upload field to only allow 1 upload.

If that would be alright, producing the XML should be pretty easy. Just use the code generator and replace all the HTML tags with XML. Let me know if you need help with that part.

I'll add "title" and "caption" fields for uploads to the feature request list. We're redoing the upload part soon so we may be able to get that one added sooner rather than later.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] XML output from CMSBuilder

By aev - December 3, 2007

Thanks for pointing me in the right direction!

I created this XML "page"...


<?php
require_once "/path_to_www_root/lib/viewer_functions.php";
$options = array();
$all_the_other_options...
?>
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1"
xmlns = "http://xspf.org/ns/0/">
<trackList>
<?php foreach ($listRows as $record): ?>
<track>
<creator><?php echo $record['creator'] ?></creator>
<title><?php echo $record['title'] ?></title>
<location><?php foreach (getUploads($options['tableName'], 'mp3', $record['num']) as $upload): ?><?php echo $upload['urlPath'] ?><?php endforeach ?></location>
</track>
<?php endforeach ?>
</trackList>
</playlist>


...and it worked great!

This multipage menu is now feeding a Flash based MP3 player with Creator Name, Track Title and the actual MP3 file.

-aev-