|decode( $entity_set, $string, ... )||
This routine replaces XML entities from $entity_set found in the
$string with the corresponding Unicode character. Unrecognized
entities are left alone.
The $entity_set can either be a name of an entity set - the selection of which can be obtained by XML::Entities::Data::names(), or all for a union, or alternatively a hashref which maps entity names (without leading &s) to the corresponding Unicode characters (or strings).
If multiple strings are provided as argument they are each decoded separately and the same number of strings are returned.
If called in void context the arguments are decoded in-place.
|numify( $entity_set, $string, ... )||This functions converts named XML entities to numeric XML entities. It is less robust than the decode function in the sense that it doesnt capture improperly terminated entities. It behaves like decode in treating parameters and returning values.|
The list of entities is defined in the XML::Entities::Data module. The list can be generated from the w3.org definition (or any other). Check perldoc XML::Entities::Data for more details.
The HTML::Entities module provides a function for encoding entities. You just have to assign the right mapping to the %HTML::Entities::char2entity hash. So, to encode everything that XML::Entities knows about, youd say:
Copyright 2012 Jan Oldrich Kruza <email@example.com>. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||XML::ENTITIES (3)||2015-08-17|