Exemplo n.º 1
0
 /**
  * Parses the mixed content of a XML node (CDATA and XML)
  *
  * @param \Xily\Xml $xmlNode The DocBook XML node
  * @return string Translated HTML code
  */
 public function parse_content($xmlNode)
 {
     $strResult = '';
     $arrContent = $xmlNode->content();
     foreach ($arrContent as $child) {
         if ($child instanceof \Xily\Xml) {
             $strResult .= $this->parseTag($child);
         } else {
             $strResult .= htmlspecialchars($child);
         }
     }
     return $strResult;
 }
Exemplo n.º 2
0
 /**
  * Parses the mixed content of a XML node (CDATA and XML)
  *
  * @param \Xily\Xml $xmlNode The DocBook XML node
  * @return string Translated HTML code
  */
 public function parse_content($xmlNode)
 {
     $strResult = '';
     $arrContent = $xmlNode->content();
     foreach ($arrContent as $child) {
         if (is_a($child, '\\Xily\\Xml')) {
             $strResult .= $this->parseTag($child);
         } elseif (is_string($child)) {
             $strResult .= $child;
         }
     }
     return $strResult;
 }