title: Retrieving relative DOM nodes in PHP
body: <p>I want to retrieve the data of the next element tag in a document, for example:</p>
  
  <p>I would like to retrieve <code>&lt;blockquote&gt; Content 1 &lt;/blockquote&gt;</code> for every different span only.</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  
  &lt;span id=12341&gt;&lt;/span&gt;
  &lt;blockquote&gt;Content 1&lt;/blockquote&gt;
  &lt;blockquote&gt;Content 2&lt;/blockquote&gt;
  
  &lt;!-- misc html in between including other spans w/ no relative blockquotes--&gt;
  
  &lt;span id=12342&gt;&lt;/span&gt;
  &lt;blockquote&gt;Content 1&lt;/blockquote&gt;
  
  &lt;!-- misc html in between including other spans w/ no relative blockquotes--&gt;
  
  &lt;span id=12343&gt;&lt;/span&gt;
  &lt;blockquote&gt;Content 1&lt;/blockquote&gt;
  &lt;blockquote&gt;Content 2&lt;/blockquote&gt;
  &lt;blockquote&gt;Content 3&lt;/blockquote&gt;
  &lt;blockquote&gt;Content 4&lt;/blockquote&gt;
  
  &lt;!-- misc html in between including other spans w/ no relative blockquotes--&gt;    
  
  &lt;span id=12344&gt;&lt;/span&gt;
  &lt;blockquote&gt;Content 1&lt;/blockquote&gt;
  &lt;blockquote&gt;Content 2&lt;/blockquote&gt;
  &lt;blockquote&gt;Content 3&lt;/blockquote&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now two things I'm wondering:</p>
  
  <p>1.)How can I write an expression that matches and only outputs a blockquote that's followed right after a closed element (<code>&lt;span&gt;&lt;/span&gt;</code>)?</p>
  
  <p>2.)If I wanted, how could I get Content 2, Content 3, etc if I ever have a need to output them in the future while still applying to the rules of the previous question?</p>