cvs: peardoc /scripts cdataify.php

From: Date: Tue, 05 May 2009 18:04:59 +0000
Subject: cvs: peardoc /scripts cdataify.php
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-11626@lists.php.net to get a copy of this message
cweiske Tue May 5 18:04:59 2009 UTC Added files: /peardoc/scripts cdataify.php Log: add script to convert entityfied programlistings to cdata sections http://cvs.php.net/viewvc.cgi/peardoc/scripts/cdataify.php?view=markup&rev=1.1 Index: peardoc/scripts/cdataify.php +++ peardoc/scripts/cdataify.php <?php /** * Encapsulates <programlisting> and <screen> tags CDATA sections if not done yet. * * @author Christian Weiske <cweiske@php.net> */ array_shift($argv); $files = $argv; foreach ($files as $file) { $doc = new DOMDocument(); $doc->load($file); $prl = $doc->getElementsByTagName('programlisting'); foreach ($prl as $node) { $cd = $doc->createCDATASection($node->nodeValue); $node->nodeValue = null; $node->appendChild($cd); } echo $doc->saveXML(); } ?>

« previous php.pear.doc (#11626) next »