]> git.sesse.net Git - xml-template/blobdiff - php7-swig/attribute2.php
Update the PHP SWIG version to PHP 7, with various crash fixes, too.
[xml-template] / php7-swig / attribute2.php
diff --git a/php7-swig/attribute2.php b/php7-swig/attribute2.php
new file mode 100644 (file)
index 0000000..8d6c99b
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+include("xml-template.php");
+
+$doc = XML_Template_process_file('../xml/clone.xml', array(
+       'color' => 'blue',
+       '#things' => XML_Template_alternate('li/class', array(
+               array( 'li' => 'Raindrops on roses' ),
+               array( 'li' => 'Whiskers on kittens' ),
+               array( 'li' => 'Bright copper kettles' ),
+               array( 'li' => 'Warm, woolen mittens' ),
+       ), array('odd', 'even'))
+), true);
+print XML_Template_convert_doc_to_string($doc);
+?>