Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to convert <,&,>,",' into XML &lt;,&amp;,&gt;,&quot ..

by ccn (Vicar)
on Dec 16, 2008 at 20:24 UTC ( [id://730731]=note: print w/replies, xml ) Need Help??


in reply to How to convert <,&,>,",' into XML &lt;,&amp;,&gt;,&quot ..

May be the following conversion will satisfy you

$xml_native =~ s/([^\w\s])/'&#'.ord($1).';'/ge;

Log In?
Username:
Password:

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

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

    No recent polls found