Reputation: 12974
I'm parsing a xml file & storing it in Database [using perl]. At the time of parsing am getting special characters like - &[quot;amp;lt;gt;]. What is the meaning of these special characters ?
Upvotes: 4
Views: 567
Reputation: 13942
Those are html-safe / xml-safe translations of characters that wouldn't be legal embedded within the document in their bare form. >"&< are all 'special characters', with special meaning in the context of HTML and XML. Well... technically > isn't reserved, but the others are. &
is a 'safe' way of specifying an ampersand character without throwing grit into the gears of the XML or HTML parser.
HTML::Entities is a module that helps you to deal with them.
Upvotes: 2
Reputation: 8895
Use HTML::Entities
module if you want to get their literal value (the way the HTML displays them).
For more info about entities, see this and this
Upvotes: 1
Reputation: 92986
See here on wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
Upvotes: 1