Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 1c397888ffb3fcd83406ae5018bea914 > files > 5

php-pear-XML_MXML-0.3.0-14.mga4.noarch.rpm

<?php

/**
 * Media Playback example.
 *
 * @package    XML_MXML
 * @author     Markus Nix <mnix@docuverse.de>
 */

require_once 'XML/MXML.php';
 

try
{
    $doc = XML_MXML::createDocument();
    $doc->enableValidation(true);
    $app = $doc->createElement('application');
    $doc->addRoot($app);
    
    $mpb = $doc->createElement('MediaPlayback', array(
        'width'  => 300, 
        'height' => 300, 
        'contentPath' => '../assets/clip.flv', 
        'controllerPolicy' => 'on'
    ));
    
    $app->appendChild($mpb);
} catch (Exception $e) {
    die($e->getMessage());
}


if ($_GET['mode'] == 'source') {
    highlight_file( __FILE__ );
} else if ($_GET['mode'] == 'dump') {
    echo "<pre>";
    echo $doc->dump();
    echo "</pre>";
} else {
    $doc->send();
}

?>