src/voku/helper/HtmlDomParser.php 1 location
|
@@ 440-450 (lines=11) @@
|
| 437 |
|
|
| 438 |
|
$documentFound = false; |
| 439 |
|
$sxe = \simplexml_load_string($html, \SimpleXMLElement::class, $optionsXml); |
| 440 |
|
if ($sxe !== false && \count(\libxml_get_errors()) === 0) { |
| 441 |
|
$domElementTmp = \dom_import_simplexml($sxe); |
| 442 |
|
if ( |
| 443 |
|
$domElementTmp |
| 444 |
|
&& |
| 445 |
|
$domElementTmp->ownerDocument |
| 446 |
|
) { |
| 447 |
|
$documentFound = true; |
| 448 |
|
$this->document = $domElementTmp->ownerDocument; |
| 449 |
|
} |
| 450 |
|
} |
| 451 |
|
|
| 452 |
|
if ($documentFound === false) { |
| 453 |
|
|
src/voku/helper/XmlDomParser.php 1 location
|
@@ 194-204 (lines=11) @@
|
| 191 |
|
$documentFound = false; |
| 192 |
|
$sxe = \simplexml_load_string($xml, \SimpleXMLElement::class, $optionsXml); |
| 193 |
|
$xmlErrors = \libxml_get_errors(); |
| 194 |
|
if ($sxe !== false && \count($xmlErrors) === 0) { |
| 195 |
|
$domElementTmp = \dom_import_simplexml($sxe); |
| 196 |
|
if ( |
| 197 |
|
$domElementTmp |
| 198 |
|
&& |
| 199 |
|
$domElementTmp->ownerDocument instanceof \DOMDocument |
| 200 |
|
) { |
| 201 |
|
$documentFound = true; |
| 202 |
|
$this->document = $domElementTmp->ownerDocument; |
| 203 |
|
} |
| 204 |
|
} |
| 205 |
|
|
| 206 |
|
if ($documentFound === false) { |
| 207 |
|
|