Complete XML output
10 posts by 3 authors in: Forums > CMS Builder
Last Post: March 10, 2008 (RSS)
I'm looking to use it for sites with an image gallery (with thumbs), a blog, mp3 player, .flv movie player and some text pages. Would it be possible to make these directories in CMS builder and that every directory outputs an xml with its content?
Thanks, Dennis
Re: [Dennis de Rooy] Complete XML output
By Dave - January 22, 2008
<?php echo $record['fieldname'] ?>
use the PHP function htmlspecialchars() to encode the content as HTML entities so it's valid XML.
<?php echo htmlspecialchars($record['fieldname']); ?>
If you need any help with this just let us know. We'd love to see a flash based site updated with CMS Builder. I think you might be the first.
Hope that helps! :)
interactivetools.com
Re: [Dave] Complete XML output
thanks for the reply, just what I wanted to hear. If I get CMS builder to output clean xml, I can build a flash site which content is created and managed by CMS builder. I'm going to give it a shot with the 10 day trial.
I'll keep you updated on my progress. When I get the first working demo I can start building full sites.
Cheers, Dennis
Re: [Dennis de Rooy] Complete XML output
By Dave - January 24, 2008
interactivetools.com
Re: [Dennis de Rooy] Complete XML output
By aev - January 24, 2008
I think you are referring to my post on the mp3/xml case I had.
I just wanted to let you know that it is only possible to make "web-retrievable" xml output with CMS Builder not actual xml files on the web server's file system. This means that if your flash file reads it's xml data from a url like http://domain.com/content.xml and NOT from the filesystem like /your_web_root_path/domain.com/content.xml everything will work fine.
Another issue is that unless you set your webserver to parse all files for PHP code you must name your xml files with a PHP extension. Like this: content.xml.php. In my case this was not a problem, but if the system/application reading your xml files is picky about extension it could be a problem.
Using AM2's publish technology it would be possible to create actual xml FILES in your filesystem. But after using both I would definitely go for CMS Builder if you can use http urls for xml data in your Flash site.
Dave, please correct me if I'm wrong on this.. maybe CMS Builder can do more than I know [:)]
Regards,
AEV
Re: [aev] Complete XML output
Cheers, Dennis
Re: [aev] Complete XML output
By Dave - January 24, 2008
It's true, all the CMS Builders files end in .php and run through the web server. You can do things like .xml.php but they still end in PHP.
If anyone needs to be able to access it through the filesystem or needs a .xml extension let me know. There's a few tricks with Apache .htaccess files and other things we could try to make that work. Try it the other way first, though.
Hope that helps! :)
interactivetools.com
Re: [Dave] Complete XML output
I finally have some time to get CMSbuilder to output XML. I changed the markup but where can I see the output pages? I can't seem to find the actual pages...[:/]
Thanks
P.s. If you need a peek at my files let me know
Re: [Dennis de Rooy] Complete XML output
By Dave - March 6, 2008
Admin > Section Editors > Your Section > Show PHP Viewer Code.
Basically you just save that code in a file on your server such as:
http://yourDomain/xmlPage.php
You'll only have one file, but that one file will be able to output different content with different urls. So for example xmlPage.php?1 would load record 1, etc.
The one thing you want to watch for, is since there isn't a .xml extension you'll need to send a header to tell the browser that it's XML. Just add this after your PHP tag:
<?php
header('Content-type: application/xml; charset=utf-8');
Hope that helps. Let me know if you have any other questions or if you need more details.
interactivetools.com
Re: [Dave] Complete XML output
I will post the results.
Cheers, Dennis