Outputing XML

I would like to output XML to be read by an external system, is there an asset that can be used to do this or would you suggest using an RSS feed.

The RSS feed is a quick way of getting something is a workable format, but you can also have control over the XML output if you want. You need to use an asset listing for this.


The asset listing gives you full control over your output. If you set all the DIVs to RAW HTML presentation type and content type, the asset listing will not put any HTML. This allows you to change the type format and header/footer to print XML in the way you want.



The last thing you have to do is set a blank design on the page (just a BODY design area to print the content, although you can also send an XML header if you want) so that no HTML is printed on your page at all; just your XML.

[quote]The RSS feed is a quick way of getting something is a workable format, but you can also have control over the XML output if you want. You need to use an asset listing for this.


The asset listing gives you full control over your output. If you set all the DIVs to RAW HTML presentation type and content type, the asset listing will not put any HTML. This allows you to change the type format and header/footer to print XML in the way you want.



The last thing you have to do is set a blank design on the page (just a BODY design area to print the content, although you can also send an XML header if you want) so that no HTML is printed on your page at all; just your XML.[/quote]



Hi Greg,



Can I ask a followup Q to this (been on my list of things to look into :wink:



When outputting the list is there a way to convert certain characters (such as quotes, ampersand etc) so that they don't produce invalid xml? I guess I mean the equivalent of 'htmlspecialchars'… had this as an issue when I was outputting calendar assets with a 'speaker' metadata field attached and the punters used ampersands…



Cheers



K

[quote]Hi Greg,


Can I ask a followup Q to this (been on my list of things to look into :wink:



When outputting the list is there a way to convert certain characters (such as quotes, ampersand etc) so that they don't produce invalid xml? I guess I mean the equivalent of 'htmlspecialchars'… had this as an issue when I was outputting calendar assets with a 'speaker' metadata field attached and the punters used ampersands…



Cheers



K[/quote]

You will have to wrap these sections in a CDATA block.