Example #1
0
 protected function getXSLTProcessor($template)
 {
     $tpl = new fDomDocument();
     $tpl->load($template);
     $xsl = new fXSLTProcessor($tpl);
     return $xsl;
 }
Example #2
0
 protected function _getPodPlaintext($xml)
 {
     $dom = new fDomDocument();
     try {
         $dom->loadXml($xml);
     } catch (\Exception $e) {
         return self::ERROR_MESSAGE;
     }
     $nodes = $dom->getElementsByTagName('plaintext');
     if (count($nodes) <= 0) {
         return self::ERROR_MESSAGE;
     }
     // I hate XML
     // just because the Node element list is a Traversable
     foreach ($nodes as $node) {
         return $node->nodeValue;
     }
 }