/**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<TestScriptAssert xmlns="http://hl7.org/fhir"></TestScriptAssert>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->label) {
         $this->label->xmlSerialize(true, $sxe->addChild('label'));
     }
     if (null !== $this->description) {
         $this->description->xmlSerialize(true, $sxe->addChild('description'));
     }
     if (null !== $this->direction) {
         $this->direction->xmlSerialize(true, $sxe->addChild('direction'));
     }
     if (null !== $this->compareToSourceId) {
         $this->compareToSourceId->xmlSerialize(true, $sxe->addChild('compareToSourceId'));
     }
     if (null !== $this->compareToSourcePath) {
         $this->compareToSourcePath->xmlSerialize(true, $sxe->addChild('compareToSourcePath'));
     }
     if (null !== $this->contentType) {
         $this->contentType->xmlSerialize(true, $sxe->addChild('contentType'));
     }
     if (null !== $this->headerField) {
         $this->headerField->xmlSerialize(true, $sxe->addChild('headerField'));
     }
     if (null !== $this->minimumId) {
         $this->minimumId->xmlSerialize(true, $sxe->addChild('minimumId'));
     }
     if (null !== $this->navigationLinks) {
         $this->navigationLinks->xmlSerialize(true, $sxe->addChild('navigationLinks'));
     }
     if (null !== $this->operator) {
         $this->operator->xmlSerialize(true, $sxe->addChild('operator'));
     }
     if (null !== $this->path) {
         $this->path->xmlSerialize(true, $sxe->addChild('path'));
     }
     if (null !== $this->resource) {
         $this->resource->xmlSerialize(true, $sxe->addChild('resource'));
     }
     if (null !== $this->response) {
         $this->response->xmlSerialize(true, $sxe->addChild('response'));
     }
     if (null !== $this->responseCode) {
         $this->responseCode->xmlSerialize(true, $sxe->addChild('responseCode'));
     }
     if (null !== $this->sourceId) {
         $this->sourceId->xmlSerialize(true, $sxe->addChild('sourceId'));
     }
     if (null !== $this->validateProfileId) {
         $this->validateProfileId->xmlSerialize(true, $sxe->addChild('validateProfileId'));
     }
     if (null !== $this->value) {
         $this->value->xmlSerialize(true, $sxe->addChild('value'));
     }
     if (null !== $this->warningOnly) {
         $this->warningOnly->xmlSerialize(true, $sxe->addChild('warningOnly'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }
 /**
  * @param boolean $returnSXE
  * @param \SimpleXMLElement $sxe
  * @return string|\SimpleXMLElement
  */
 public function xmlSerialize($returnSXE = false, $sxe = null)
 {
     if (null === $sxe) {
         $sxe = new \SimpleXMLElement('<TestScriptOperation xmlns="http://hl7.org/fhir"></TestScriptOperation>');
     }
     parent::xmlSerialize(true, $sxe);
     if (null !== $this->type) {
         $this->type->xmlSerialize(true, $sxe->addChild('type'));
     }
     if (null !== $this->resource) {
         $this->resource->xmlSerialize(true, $sxe->addChild('resource'));
     }
     if (null !== $this->label) {
         $this->label->xmlSerialize(true, $sxe->addChild('label'));
     }
     if (null !== $this->description) {
         $this->description->xmlSerialize(true, $sxe->addChild('description'));
     }
     if (null !== $this->accept) {
         $this->accept->xmlSerialize(true, $sxe->addChild('accept'));
     }
     if (null !== $this->contentType) {
         $this->contentType->xmlSerialize(true, $sxe->addChild('contentType'));
     }
     if (null !== $this->destination) {
         $this->destination->xmlSerialize(true, $sxe->addChild('destination'));
     }
     if (null !== $this->encodeRequestUrl) {
         $this->encodeRequestUrl->xmlSerialize(true, $sxe->addChild('encodeRequestUrl'));
     }
     if (null !== $this->params) {
         $this->params->xmlSerialize(true, $sxe->addChild('params'));
     }
     if (0 < count($this->requestHeader)) {
         foreach ($this->requestHeader as $requestHeader) {
             $requestHeader->xmlSerialize(true, $sxe->addChild('requestHeader'));
         }
     }
     if (null !== $this->responseId) {
         $this->responseId->xmlSerialize(true, $sxe->addChild('responseId'));
     }
     if (null !== $this->sourceId) {
         $this->sourceId->xmlSerialize(true, $sxe->addChild('sourceId'));
     }
     if (null !== $this->targetId) {
         $this->targetId->xmlSerialize(true, $sxe->addChild('targetId'));
     }
     if (null !== $this->url) {
         $this->url->xmlSerialize(true, $sxe->addChild('url'));
     }
     if ($returnSXE) {
         return $sxe;
     }
     return $sxe->saveXML();
 }