sub escape_xml { XML::LibXML::Text->new(shift)->toString } print escape_xml('<&');