public function getValues($recursive = TRUE) {
    $values = new NodeCollection();
    foreach ($this->elements->getItems() as $element) {
      if ($element instanceof ArrayPairNode) {
        $value = $element->getValue();
        if ($recursive && $value instanceof ArrayNode) {
          $values->add($value->getValues($recursive));
        }
        else {
          $values->add($value);
        }
      }
      else {
        $values->add($element);
      }
    }
    return $values;
  }