Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2. try {
  3. $sxe = simplexml_load_string($xmlstring, 'SimpleXMLIterator');
  4. for ($sxe->rewind(); $sxe->valid(); $sxe->next()) {
  5. if ($sxe->hasChildren()) {
  6. foreach ($sxe->getChildren() as $element=>$value) {
  7. echo $value->species . '<br />';
  8. }
  9. }
  10. }
  11. }
  12. catch(Exception $e) {
  13. echo $e->getMessage();
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement