SimpleSAML_Utilities::formatXMLString PHP Method

formatXMLString() public static method

Deprecation: This method will be removed in SSP 2.0. Please use SimpleSAML\Utils\XML::formatXMLString() instead.
public static formatXMLString ( $xml, $indentBase = '' )
    public static function formatXMLString($xml, $indentBase = '')
    {
        return SimpleSAML\Utils\XML::formatXMLString($xml, $indentBase);
    }

Usage Example

Beispiel #1
0
    protected function getDebugOutput($testrun, $body, $request, $relaystate, $response)
    {
        $sb = 'NA';
        if (preg_match('|<body.*?>(.*?)</body>|is', $body, $matches)) {
            $sb = strip_tags($matches[1], '<p><span><div><table><tr><td><ul><li><ol><dd><dt><dl><code><pre>');
        }
        $html = '<div class="debugoutput">

					<p>AuthnRequest:</p>
					<div><pre class="debugbox"><code>' . htmlspecialchars(SimpleSAML_Utilities::formatXMLString($request)) . '</code></pre></div>

					<p>RelayState:</p>
					<div><pre class="debugbox"><code>' . var_export($relaystate, TRUE) . '</div>


					<p>Response:</p>
					<div><pre class="debugbox"><code>' . htmlspecialchars(SimpleSAML_Utilities::formatXMLString($response)) . '</code></pre></div>

					<p>Resulting output from web page:</p>
					<div class="htmlout">' . $sb . '</div>


				</div>
		';
        #echo '<div>' . $html . '</div>'; exit;
        return $html;
    }
All Usage Examples Of SimpleSAML_Utilities::formatXMLString