Subject: | imported XML containing newlines is not parsed?/written out correctly |
This works:
$content->appendElement(
'//draw:page', 0,
q(<chart:chart svg:width="5cm" svg:height="5cm"
chart:class="bar"><chart:title><text:p>A NEW
Title</text:p></chart:title></chart:chart>),
);
But this doesn't:
$content->appendElement(
$page,
q(<chart:chart svg:width="5cm" svg:height="5cm" chart:class="bar">
<chart:title>
<text:p>A Title</text:p>
</chart:title>
</chart:chart>),
);
The content.xml file winds up with this (note the gratuitous
starting/ending < and />).
<<chart:chart svg:width="5cm" svg:height="5cm" chart:class="bar">
<chart:title>
<text:p>A Title</text:p>
</chart:title>
</chart:chart>/>