<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

class EmailXMLNode extends Datamodul
{
  public $emailid;

  
  public function getXMLNode($pNodeTag = 'EMAILXMLNode', $pExceptions = array())
  {
    $rootNode = new XMLNode($pNodeTag);
    for ($i = 0; $i < $this->getVarCount(); $i++) {
      $varname = $this->getVarName($i);
      if (in_array($varname, $pExceptions)) {
        continue;
      }
      $value = $this->getVarValue($varname);
      if ($value != '') {
        $rootNode->addChild(new XMLNode(StringOperations::strtoupper($varname), $this->getVarValue($varname)));
      }
    }

    return $rootNode;
  }
}