private function createRequest()
    {
        $xml = new DOMDocument();
        $xml->formatOutput = true;

        // Create the QuantumViewRequest element
        $quantumViewRequest = $xml->appendChild($xml->createElement('QuantumViewRequest'));
        $quantumViewRequest->setAttribute('xml:lang', 'en-US');

        // Create the SubscriptionRequest element
        if (null !== $this->name || null !== $this->beginDateTime || null !== $this->fileName) {
            $subscriptionRequest = $quantumViewRequest->appendChild($xml->createElement('SubscriptionRequest'));

            // Subscription name
            if (null !== $this->name) {
                $subscriptionRequest->appendChild($xml->createElement('Name', $this->name));
            }

            // Date Time Range
            if (null !== $this->beginDateTime) {
                $dateTimeRange = $subscriptionRequest->appendChild($xml->createElement('DateTimeRange'));
                $dateTimeRange->appendChild($xml->createElement('BeginDateTime', $this->beginDateTime));
                $dateTimeRange->appendChild($xml->createElement('EndDateTime', $this->endDateTime));

            // File name
            } elseif (null !== $this->fileName) {
                $subscriptionRequest->appendChild($xml->createElement('FileName', $this->fileName));
            }
        }

        // Create the Bookmark element
        if (null !== $this->bookmark) {
            $quantumViewRequest->appendChild($xml->createElement('Bookmark', $this->bookmark));
        }

        // Create the Request element
        $request = $quantumViewRequest->appendChild($xml->createElement('Request'));

        $node = $xml->importNode($this->createTransactionNode(), true);
        $request->appendChild($node);

        $request->appendChild($xml->createElement('RequestAction', 'QVEvents'));

        return $xml->saveXML();
    }