Simple Example - silverorange/swat GitHub Wiki

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();

?>
⚠️ **GitHub.com Fallback** ⚠️