convert xml to json on the command line. not streaming, pure javascript