Refactoring puts_XML_tags.php