Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
iw_ostream and xml header !
vahu
Hi all,
I have a tpl in which i have an iw_ostream. The iw_ostream outputs an additional xml file. But I am having problems with the header of the outputet file. It has a square (line feed) and some spaces before the actual XML declaration tag.
I have tried applying these regular expressions to the variable containing the xml:
$XMLOutput =~ s/^\n//;
$XMLOutput =~ s/^\s+//;
But it does not make any difference.
Any help will be greatly appreciated.
Regards
Saya
Find more posts tagged with
Comments
Adam Stoller
We need to see more (all?) of the PT code in order to provide assistance.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
vahu
Hi Fish,
I found the solution or rather problem.
Before I was doing the following:
<iw_ostream file_val="$genFilePath" oenc="UTF-8" mode="cwd">
<iw_value name="$XMLOutput"/>
</iw_ostream>
Outputting the file like this was giving the error !
Now I have changed it to:
<iw_ostream file_val="$genFilePath" oenc="UTF-8" mode="cwd"><iw_value name="$XMLOutput"/></iw_ostream>
On a single line there are no extra spaces or linebreaks inserted in the XML document now :-)
Regards
Saya