public function getLicenseHtml( \SimpleXMLElement $response, $except_where_otherwise_noted = true ) {

		$content = $response->asXML();
		$content = trim( str_replace( [ '<p xmlns:dct="http://purl.org/dc/terms/">', '</p>', '<html>', '</html>' ], '', $content ) );
		$content = preg_replace( '/http:\/\/i.creativecommons/iU', 'https://i.creativecommons', $content );

		$html = '<div class="license-attribution" xmlns:cc="http://creativecommons.org/ns#"><p xmlns:dct="http://purl.org/dc/terms/">';
		if ( $except_where_otherwise_noted ) {
			$html .= rtrim( $content, '.' ) . ', ' . __( 'except where otherwise noted.', 'pressbooks' );
		} else {
			$html .= $content;
		}
		$html .= '</p></div>';

		return html_entity_decode( $html, ENT_XHTML, 'UTF-8' );
	}