Added output to XML or JSON via parameter of the _request() function. Added some doc and a test output file (result.xml)