true, //Include structured data about tags and categories 'includeItemSubjects' => true, // Include basic data about tags and categories 'includeCreatorData' => true, // Include basic data about creators 'includeStructuredCreatorData' => true, //include structured data about creators 'includeOriginalPostData' => true, //include data about the original post (true to use tags and categories) 'checkImgSrcs' => true, //whether to check availability of image sources 'linkToEmbeddedObjects' => false, 'indexSubjects' => true, 'indexCategories' => true, 'indexTags' => true, 'indexPeople' => true, 'indexImages' => true, ); $ops['outputParams'] = $_SESSION['outputParams']; $tei = new TeiDom($_SESSION, $ops); $api = new TeiApi($tei); //if you want to make it a download. $fileName = $api->getFileName(); $ext = "xml"; header("Content-type: application/xml"); header("Content-Disposition: attachment; filename=$fileName.$ext"); echo $tei->getTeiString(); die();