in reply to Re^2: xml::libxml open, add and save not formatting properly
in thread xml::libxml open, add and save not formatting properly
you could usesub text_to_xml { my $s = shift; $s =~ s/]]>/]]>]]><![CDATA[/g; return "<![CDATA[$xml]]>"; }
use HTML::Entities qw( encode_entities ); sub text_to_xml { return encode_entities($text, '<&'); }
|
|---|