Refactored node.js and added some new functionality wrt indentation within the xml string