MM_XSLTransform error.
http://www.realintelligence.com/api/showagenda-cc.py?orgId=00Do0000000aAt2&eventId=a0J1J00001H0ji2&sandbox=false is not a valid XML document.
DOMDocument::loadXML(): Start tag expected, '<' not found in Entity, line: 1 in file http://www.realintelligence.com/api/showagenda-cc.py?orgId=00Do0000000aAt2&eventId=a0J1J00001H0ji2&sandbox=false.
#!/usr/bin/env python

import sys
sys.path.append("/var/www/vhosts/realintelligence.com/cgi-bin/xmlcreator/")

import xmlshowagenda2
from cgi_util import *

import cPickle as pickle



orgId = cgi_params['orgId'].value
eventId = cgi_params['eventId'].value
try:
    sandbox = get_param_bool('sandbox', False)
except KeyError:
    sandbox = False 

try:
    with open("./data.pkl", "rb") as pkl_file:
        pkl_data = pickle.load(pkl_file)
        org_creds = __import__(orgId)
        if pkl_data[orgId] and pkl_data[orgId]['username']:
            xmlshowagenda2.get_units(pkl_data[orgId]['username'], pkl_data[orgId]['password'], eventId, sandbox)
        else:
            raise KeyError 
except IOError:
    with open("./data.pkl", "w+b") as pkl_file:
        data = {orgId: {'username': '', 'password': ''}}
        pickle.dump(data, pkl_file)
        print "Content-Type: text/html"
        print 
        print "Pickle file doesn't exist. Creating. Reload"  

    with open("./data.pkl", "rb") as new_pkl_file:
        pkl_data = pickle.load(new_pkl_file)
        xmlshowagenda2.get_units(pkl_data[orgId]['username'], pkl_data[orgId]['password'], eventId, sandbox)
except KeyError:
    with open("./data.pkl", "w+b") as pkl_file:
        pkl_data[orgId] = {"username": org_creds.username, "password": org_creds.password}
        pickle.dump(pkl_data, pkl_file)
    with open("./data.pkl", "rb") as new_pkl_file:
        pkl_data = pickle.load(new_pkl_file)
        xmlshowagenda2.get_units(pkl_data[orgId]['username'], pkl_data[orgId]['password'], eventId, sandbox)
except ImportError:
    with open("./data.pkl", "w+b") as pkl_file:
        pkl_data[orgId] = {"username": '', "password": ''}
        pickle.dump(pkl_data, pkl_file)
        print "Content-Type: text/html"
        print 
        print "Written to orgId pickle" + orgId