XML vs. HTML, replace '<' and '>'

$buffer_out .= `cat /online_dir/online.xml`; 
$buffer_out =~ s/</&lt;/g;
$buffer_out =~ s/>/&gt;/g;