folks i have this xml file
Code:
<greatpeople>
  <person>
    <firstname> Edward   </firstname>
    <name>      Jenner   </name>
  </person>
  <person>
    <firstname> Alan </firstname>
    <name>      Elion    </name>
  </person>
  <person>
    <firstname> Charles  </firstname>
    <name>      Babbage  </name>
  </person>
  <person>
    <firstname> Alan     </firstname>
    <name>      Touring  </name>
  </person>
  <person>
    <firstname> Ada      </firstname>
    <name>      Byron    </name>
  </person>

</greatpeople>
What i want is how can i apply PHP so that i can get all the information
where person firstname== Alan so that i get following xml as result
Code:
<person>
    <firstname> Alan </firstname>
    <name>      Elion    </name>
  </person>
  <person>
    <firstname> Alan     </firstname>
    <name>      Touring  </name>
  </person>
i have seen simple xml but that is only used for traversing... can any one tell how to do this in php??