in reply to creating an XML string

I'm assuming you meant turning "IBM & Microsoft" into "IBM & Microsoft".

You will want something like XML::Writer, since strictly speaking there is no such thing as an "XML string" as you describe (mainly because the "best" encoding also depends on the character encoding of the XML file). Using an XML generator will probably save you a lot of work anyway.