Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: xml::libxml open, add and save not formatting properly

by ikegami (Patriarch)
on Mar 24, 2010 at 18:08 UTC ( [id://830632]=note: print w/replies, xml ) Need Help??


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

Instead of
sub text_to_xml { my $s = shift; $s =~ s/]]>/]]>]]&gt;<![CDATA[/g; return "<![CDATA[$xml]]>"; }
you could use
use HTML::Entities qw( encode_entities ); sub text_to_xml { return encode_entities($text, '<&'); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://830632]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-16 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found