public static function elementChildren($elements) {
    // Filter out properties from the element, leaving only children.
    $children = array();
    foreach ($elements as $key => $value) {
      if ($key === '' || $key[0] !== '#') {
        $children[$key] = $value;
      }
    }
    return array_keys($children);
  }