I am trying to parse svg via simple html dom.
Managed to get svg as html element from original page:
<svg class="EndorsementIcon-background">
<use xlink:href="https://static.playoverwatch.com/svg/icons/circle-d9d589e7b6.svg#circle"></use>
</svg>
As I understand Simple HTML Dom can not get xml which is inside svg. Can I parse svg element using php?
Used html simple dom code to find div by class name:
<?php
include __DIR__ . '/simple_html_dom.php';
$data = file_get_html('http://playoverwatch.com/player-profile');
$result = $data->find('.endorsement-level',0);
echo $result;
Parsed SVG element on my html page should look like this:
<svg class="EndorsementIcon-background" viewBox="0 0 36 36">
<circle cx="50%" cy="50%" r="15.9155"></circle>
</svg>