Example #1
0
 /**
  * Return transformed content.
  * 
  * @return string
  */
 public function getContent()
 {
     if ($this->pxeDoc) {
         // Turning on output formatting is suitable for debugging purposes only
         // $this->pxeDoc->formatOutput = true;
         //
         // Production usage requires this to be off,
         // so that <span>abc</span><span>def</span> doesn't come out with a space like "abc def"
         $this->pxeDoc->formatOutput = false;
         if ($this->isDocument) {
             return $this->pxeDoc->saveXML();
         } else {
             return $this->pxeDoc->saveXML($this->currentElement);
         }
     } else {
         return '';
     }
 }