What is the best practice for generating valid XML with PHP from user-submitted text, for example. eCommerce sales data with ampersands, angle brackets, accents without ascii, newlines, etc. etc.
What functions, libraries, regular expressions do people use?
source
share