Javascript 2 xml converter