Skip to content
Michael Gauthier edited this page Aug 5, 2013 · 2 revisions

hello-world.xml

<?xml version="1.0" standalone="no"?>
<!DOCTYPE swatml SYSTEM "http://swat.silverorange.com/swatml1.dtd">
<swatml>
    <widget class="SwatContentBlock">
        <property name="content" type="string">Hello, World!</property>
    </widget>
</swatml>

hello-world.php

<?php

require_once 'Swat/SwatAutoloader.php';
SwatAutoloader::loadRules('autoloader-rules.conf');
 
$ui = new SwatUI();
$ui->loadFromXML('hello-world.xml');
$ui->display();

?>
Clone this wiki locally