If its related to Anton's comment, make sure you do not rely on implicit data type conversion.
So look at each:
p_xml_out :=p_xml_out||'<tag>'|| something ||'</tag>' ;
- If "something" is a varchar2, then no change needed.
- If "something" is a number, then change "something" to "to_char(something)"
- If "something" is a date, then change "something" to "to_char(something,'yyyy-mm-dd')" or similar
Try that.