You are here

protected function GPX::childElements in geoPHP 8

Same name and namespace in other branches
  1. 7 geoPHP/lib/adapters/GPX.class.php \GPX::childElements()
2 calls to GPX::childElements()
GPX::parseRoutes in geoPHP/lib/adapters/GPX.class.php
GPX::parseTracks in geoPHP/lib/adapters/GPX.class.php

File

geoPHP/lib/adapters/GPX.class.php, line 82

Class

GPX
PHP Geometry/GPX encoder/decoder

Code

protected function childElements($xml, $nodename = '') {
  $children = array();
  foreach ($xml->childNodes as $child) {
    if ($child->nodeName == $nodename) {
      $children[] = $child;
    }
  }
  return $children;
}