That's because you're using text to get the content of the element. Form the docs:
Return a string consisting of all the PCDATA and CDATA in an element, without any tags. The text is not XML-escaped: base entities such as & and < are not escaped.
What you are looking for is xml_text (Return the text of the element, encoded, without any tag.) or xml_string (returns the string for the entire element, excluding the element's tags (but nested element tags are present).
In reply to Re: XML::Twig::flush() and html/xml entities
by mirod
in thread XML::Twig::flush() and html/xml entities
by mandarin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |