XML to JS Object and Add some utility functions