Source for file example2.php
Documentation is available at example2.php
require_once 'XML/Util.php';
* creating a start element
print "creating a start element:<br>";
* creating a start element
print "creating a start element:<br>";
* creating a start element
print "creating a start element:<br>";
* creating an end element
print "creating an end element:<br>";
* creating a CData section
print "creating a CData section:<br>";
print "creating a comment:<br>";
* creating an XML tag with multiline mode
"namespaceUri" => "http://foo.com",
"attributes" => array ( "key" => "value", "argh" => "fruit&vegetable" ),
"content" => "I'm inside the tag & contain dangerous chars"
print "creating a tag with qualified name and namespaceUri:<br>\n";
* create an attribute string without replacing the entities
$atts = array ( 'series' => 'Starsky & Hutch', 'channel' => 'ABC' );
print "creating a attribute string, entities in values already had been replaced:<br>";
* using the array-syntax for attributesToString()
$atts = array ( 'series' => 'Starsky & Hutch', 'channel' => 'ABC' );
print "using the array-syntax for attributesToString()<br>";
Documentation generated on Mon, 11 Mar 2019 10:17:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|