Added xml to json conversion and handling multiple doc types and urls