Source for file example.php
Documentation is available at example.php
require_once 'XML/Util.php';
print "replace XML entities:<br>\n";
* building XML declaration
print "building XML declaration:<br>\n";
print "building XML declaration with additional attributes:<br>";
* building document type declaration
print "building DocType declaration:<br>\n";
print "building DocType declaration with public ID (does not exist):<br>\n";
print "building DocType declaration with internal DTD:<br>\n";
* creating an attribute string
print "converting array to string:<br>\n";
* creating an attribute string with linebreaks
print "converting array to string (including line breaks):<br>\n";
* splitting a qualified tag name
print "splitting qualified tag name:<br>\n";
* splitting a qualified tag name (no namespace)
print "splitting qualified tag name (no namespace):<br>\n";
* splitting a qualified tag name (no namespace, but default namespace specified)
print "splitting qualified tag name (no namespace, but default namespace specified):<br>\n";
print "verifying 'My private tag':<br>\n";
print "verifying '-MyTag':<br>\n";
"attributes" => array ( "key" => "value", "argh" => "fruit&vegetable" ),
"content" => "I'm inside the tag"
print "creating a tag with namespace and local part:<br>";
"namespaceUri" => "http://foo.com",
"attributes" => array ( "key" => "value", "argh" => "fruit&vegetable" ),
"content" => "I'm inside the tag"
print "creating a tag with qualified name and namespaceUri:<br>\n";
"namespaceUri" => "http://foo.com",
"attributes" => array ( "key" => "value", "argh" => "fruit&vegetable" )
print "creating an empty tag without namespace but namespace Uri:<br>\n";
* creating an XML tag with a CData Section
"attributes" => array ( "key" => "value", "argh" => "fruit&vegetable" ),
"content" => "I'm inside the tag"
print "creating a tag with CData section:<br>\n";
* creating an XML tag with createTag
print "creating a tag with createTag:<br>";
* trying to create an XML tag with an array as content
"content" => array ( "foo" => "bar" )
print "trying to create an XML tag with an array as content:<br>\n";
Documentation generated on Mon, 11 Mar 2019 10:17:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|