php domdocument get all code example Example: php domdocument list all elements foreach($dom->getElementsByTagName('*') as $element ){ }