getElementbyid
document.getElementById("someid");
Grepper
document.getElementById("someid");
<?php
$doc = new DomDocument;
// We need to validate our document before referring to the id
$doc->validateOnParse = true;
$doc->Load('my.xml');
echo $doc->getElementById('php-basics') . "\n";
?>