Utility methods to do XML text to JSON text conversions