Reverted back to echoing json to diagnose js2xmlparser error.
Probable fix for js2parser.
fix1
Using a different approach now with json2xml.
Change to fix json2xml
JSON2XML now properly works. XML String being returned is properly formatted.
Now supporting pagination. Issue with mongodb fixed. Connections are now being closed properly.