Forums / Setup & design / Remove all whitespace

Remove all whitespace

Author Message

Daniel Guerrier

Monday 25 July 2005 9:04:10 am

I created this template to export some info as xml.
It seems to be adding some return characters to the output and it is messing up the application that is using it.
I would like to keep the template readable for future editing but I can't avoid outputing the return charaters. Is there a way of doing so?

<?xml version="1.0" encoding="UTF-8"?>
<media>
{let items=fetch( 'content', 'list', hash( 'parent_node_id', 110))}
{section var=item loop=$items}
<item>
<name><![CDATA[{attribute_view_gui attribute=$item.object.data_map.name}]]></name>
<description><![CDATA[{attribute_view_gui attribute=$item.object.data_map.shortdescription}]]></description>
<path>
{let site_url=ezini('SiteSettings','SiteURL') file_path=$item.data_map.file.content.filepath}
{concat('http://', $site_url, '/', $file_path)}
{/let}
</path>
</item>
{/section}
{/let}
</media>

David Eriksson

Tuesday 26 July 2005 12:26:59 am

Perhaps <i>trim</i> can help you?

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_operators/strings/trim

/David