poll to xml and javascript