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
|
@@ 173-183 (lines=11) @@
|
170 |
|
$documentFound = false; |
171 |
|
$sxe = \simplexml_load_string($xml, \SimpleXMLElement::class, $optionsXml); |
172 |
|
$xmlErrors = \libxml_get_errors(); |
173 |
|
if ($sxe !== false && \count($xmlErrors) === 0) { |
174 |
|
$domElementTmp = \dom_import_simplexml($sxe); |
175 |
|
if ( |
176 |
|
$domElementTmp |
177 |
|
&& |
178 |
|
$domElementTmp->ownerDocument instanceof \DOMDocument |
179 |
|
) { |
180 |
|
$documentFound = true; |
181 |
|
$this->document = $domElementTmp->ownerDocument; |
182 |
|
} |
183 |
|
} |
184 |
|
|
185 |
|
if ($documentFound === false) { |
186 |
|
|