Class Tabbar - XML Generator for DHTMLX
$tabbar = new Tabbar( set encoding, default utf-8 )
$tabbar = new Tabbar;
or
$tabbar = new Tabbar('iso-8859-1');
$tabbar->tab( array( 'key attribute' => 'value attribute' ) )
$tabbar->tab(
array(
"id" => "tab1",
"text" => "Tab 1",
"content" => "content of tab"
)
);
$tabbar->header()
$tabbar->header();
return
header("Content-type: application/xml; charset=utf-8");
$tabbar->result()
echo $tabbar->result();
Print XML
<?php
include_once 'DHX.php';
$tabbar = new Tabbar;
$tabbar->tab(
array(
"id" => "tab1",
"text" => "Tab 1"
),
array(
"id" => "tab2",
"text" => "Tab 2",
"content" => "content of tab"
),
array(
"id" => "tab3",
"text" => "Tab 3",
"content" => "content of tab"
)
);
$tabbar->header();
echo $tabbar->result();
?>
Result
<?xml version="1.0" encoding="utf-8"?>
<tabbar>
<row>
<tab id="tab1">Tab 1</tab>
<tab id="tab2">
Tab 2
<content>
<![CDATA[ content of tab ]]>
</content>
</tab>
<tab id="tab3">
Tab 3
<content>
<![CDATA[ content of tab ]]>
</content>
</tab>
</row>
</tabbar>
Lucas Tiago de Moraes