Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: How can I use XML::Simple parser to read and parse greater then (>), less then (<) and ampersand (&) symbol..

by amias (Novice)
on Dec 12, 2012 at 11:36 UTC ( #1008490=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How can I use XML::Simple parser to read and parse greater then (>), less then (<) and ampersand (&) symbol..
in thread How can I use XML::Simple parser to read and parse greater then (>), less then (<) and ampersand (&) symbol..

You should enclose them in a CDATA block to keep them safe from the parser , all parsers should respect this.

 <tag><![CDATA <?>&;]!> ]]></tag>

the only thing you cannot put in CDATA is ]]> as its the CDATA terminator , however if its essential then you could do something like

<tag><![CDATA ]]]]><![CDATA >]]></tag>

for the full info see http://www.w3schools.com/xml/xml_cdata.asp


Comment on Re^3: How can I use XML::Simple parser to read and parse greater then (>), less then (<) and ampersand (&) symbol..
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-07-31 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls