protected function returnValidXml($data)
    {
        if (empty($data)) {
            throw new common_exception_NotFound('Delivery execution not found.');
        }

        $doc = @simplexml_load_string($data);
        if (!$doc) {
            common_Logger::i('invalid xml result');
            throw new Exception('Xml output is malformed.');
        }

        // force XML content type header
        header('Content-Type: application/xml');

        echo $data;
        exit(0);
    }
protected function returnValidXml($data)
    {
        if (empty($data)) {
            throw new common_exception_NotFound('Delivery execution not found.');
        }

        $doc = @simplexml_load_string($data);
        if (!$doc) {
            common_Logger::i('invalid xml result');
            throw new Exception('Xml output is malformed.');
        }

        // force XML content type header
        header('Content-Type: application/xml');

        echo $data;
        exit(0);
    }
protected function returnValidXml ( $ data ) { if ( empty ( $ data ) ) { throw new common_exception_NotFound ( 'Delivery execution not found.' ) ; } $ doc = @ simplexml_load_string ( $ data ) ; if ( ! $ doc ) { common_Logger :: i ( 'invalid xml result' ) ; throw new Exception ( 'Xml output is malformed.' ) ; } // force XML content type header header ( 'Content-Type: application/xml' ) ; echo $ data ; exit ( 0 ) ; }
Return XML response if it is valid.

@param string $data
@throws Exception
@throws common_exception_NotFound
Return XML response if it is valid .