title: XML Skip 'wrong' event type
body: <p>I have a certain BLOATED XML file that i use to generate a Gallery with some few information about the Picture. Besides of the Actual needed NEW there are plenty of entries with OLD, adding more pictures, but creating also duplicate entries.</p>
  
  <pre><code>&lt;result&gt;
  &lt;event&gt;
    &lt;date&gt;2015-04-14T22:19:02+02:00&lt;/date&gt;
    &lt;type&gt;OLD&lt;/type&gt;
    &lt;value1&gt;AAA&lt;/value1&gt;
    &lt;id&gt;changingIDwhatever&lt;/id&gt;
    &lt;profile&gt;
      &lt;url&gt;/domainpart/SPECIFICNAME/?w=&lt;/url&gt;
      &lt;name&gt;SPECIFICNAME&lt;/name&gt;
      &lt;value2&gt;BBB&lt;/value2&gt;
      &lt;value3&gt;CCC&lt;/value3&gt;
      &lt;value4&gt;DDD&lt;/value4&gt;
        &lt;image&gt;
          &lt;url&gt;http://domain.tld/path/to/the/image/320.jpg?1234-ab1cd2e345fg6789&lt;/url&gt;
          &lt;width&gt;320&lt;/width&gt;
        &lt;/image&gt;
    &lt;/profile&gt;
  &lt;/event&gt;
  &lt;event&gt;
    &lt;date&gt;2015-04-14T22:19:02+02:00&lt;/date&gt;
    &lt;type&gt;NEW&lt;/type&gt;
    &lt;value1&gt;AAA&lt;/value1&gt;
    &lt;id&gt;changingIDwhatever&lt;/id&gt;
    &lt;profile&gt;
      &lt;url&gt;/domainpart/ANOTHERNAME/?w=&lt;/url&gt;
      &lt;name&gt;ANOTHERNAME&lt;/name&gt;
      &lt;value2&gt;BBB&lt;/value2&gt;
      &lt;value3&gt;CCC&lt;/value3&gt;
      &lt;value4&gt;DDD&lt;/value4&gt;
        &lt;image&gt;
          &lt;url&gt;http://domain.tld/path/to/the/image/320.jpg?1234-ab1cd2e345fg6789&lt;/url&gt;
          &lt;width&gt;320&lt;/width&gt;
        &lt;/image&gt;
    &lt;/profile&gt;
  &lt;/event&gt;
  &lt;event&gt;
    &lt;date&gt;2015-04-14T22:19:02+02:00&lt;/date&gt;
    &lt;type&gt;NEW&lt;/type&gt;
    &lt;value1&gt;AAA&lt;/value1&gt;
    &lt;id&gt;changingIDwhatever&lt;/id&gt;
    &lt;profile&gt;
      &lt;url&gt;/domainpart/SPECIFICNAME/?w=&lt;/url&gt;
      &lt;name&gt;SPECIFICNAME&lt;/name&gt;
      &lt;value2&gt;BBB&lt;/value2&gt;
      &lt;value3&gt;CCC&lt;/value3&gt;
      &lt;value4&gt;DDD&lt;/value4&gt;
        &lt;image&gt;
          &lt;url&gt;http://domain.tld/path/to/the/image/320.jpg?1234-ab1cd2e345fg6789&lt;/url&gt;
          &lt;width&gt;320&lt;/width&gt;
        &lt;/image&gt;
    &lt;/profile&gt;
  &lt;/event&gt;
  &lt;/result&gt;
  </code></pre>
  
  <p>I do generate everything in a pretty neat layout in a very basic way. As i have really NO knowledge at all about php, i usually base on skriptpieces i find that are kind of put together in a way that the outcome mostly is the way i need it.</p>
  
  <pre><code>&lt;?php
  //###################Config Start#########################
  $memberid = "123456";
  $maxAnzahl = 50;
  $zaehler = 0;
  $baseURL = "http://www.domain.tld";
  //###################Config End#########################
  $feed = simplexml_load_file('http://key:keypass@www.domain.tld/news/xml');
  $events = $feed-&gt;events;
  foreach ($events-&gt;event as $event) {
  echo "&lt;div class='4u'&gt;";
  echo "&lt;article class='box style2'&gt;";
  if ($event-&gt;type == "newMember") {
  echo "&lt;a href='".$baseURL.$event-&gt;profile-&gt;url.$memberid."' class='image featured' target='_blank'&gt;&lt;img src='" . $event-&gt;profile-&gt;image-&gt;url . "' alt='' /&gt; &lt;/a&gt;";
  } else {
  echo "&lt;a href='".$baseURL.$event-&gt;profile-&gt;url.$memberid."' class='image featured' target='_blank'&gt;&lt;img src='" . $event-&gt;image-&gt;url . "' alt='' /&gt; &lt;/a&gt;";
  }
  echo "&lt;h3&gt;&lt;a href='".$baseURL.$event-&gt;profile-&gt;url.$memberid."'&gt;" . $event-&gt;profile-&gt;name . "&lt;/a&gt;&lt;/h3&gt;";
  echo "&lt;/article&gt;";
  echo "&lt;/div&gt;";
  $zaehler = $zaehler + 1;
  if ($zaehler == $maxAnzahl) {
  break;
  }
  }
  ?&gt;
  </code></pre>
  
  <p>Would be someone able to tell me how i could specify now in that skript how to SKIP all OLD ?</p>
  
  <p>Kind Regards
  Caylean</p>