]> git.sesse.net Git - xml-template/blobdiff - php5-swig/attribute3.php
Fix some use-after-frees in the C++11 version.
[xml-template] / php5-swig / attribute3.php
index 8b84e7da6b520b5948640c1f78af4b7040579ec5..1262a906b897aa8f82b3b5830f25cb559ae546e6 100644 (file)
@@ -1,7 +1,7 @@
 <?php
+include("xml-template.php");
 
-dl("XML_Template_SWIG.so");
-$doc = process_file('../xml/clone.xml', array(
+$doc = XML_Template_process_file('../xml/clone.xml', array(
        'color' => 'blue',
        '#things' => XML_Template_alternate('li/class', array(
                array( 'li' => 'Raindrops on roses' ),
@@ -11,5 +11,5 @@ $doc = process_file('../xml/clone.xml', array(
                array( 'li' => 'Warm, woolen mittens' ),
        ), array('odd', 'even'))
 ), true);
-output_to_fd_and_free($doc, 1);
+print XML_Template_convert_doc_to_string($doc);
 ?>