in reply to How to convert <,&,>,",' into XML <,&,>," ..
Or you could build your XML using a module (XML::Writer, XML::Generator)