title: simple HTML DOM parser iterate over each node
body: <p>i need some help with the simple HTML DOM parser.
  I want to loop through each and every node in the DOM.
  I want something similar to the jquery '*'.</p>
  
  <p>Currently my code reads:</p>
  
  <pre><code> $style_array = array();
   foreach($doc1-&gt;find('*') as $element)
   {
   array_push($style_array,$element-&gt;getAttribute('src'));
   };
   print_r($style_array);
  </code></pre>
  
  <p>This is just an example, im aware that every node will not have an src attribute, but in that case im ready to deal with blank elements in my array. I need it not only for this, but for several other functions that i need to run, iterating over every single node in the document.</p>
  
  <p>At the moment this produces an array with absolutely nothing inside it.</p>