Changed XML renderer to return rather than echo
Tests for view output