Improved code style: constants for error numbers, createXMLWithRoot function