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