1. Go to this page and download the library: Download volux/dom library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use volux\Dom;
Dom\Document::doc()->load('example.xml')
->find('.content')->xslt('content.xsl')
->end()
->saveHTMLfile('transformed.html');
/* each tags with class="content" will be transformed and replaced */
use volux\Dom;
$form = new Dom\Form();
$form
->fieldSet('Group 1')
->add()
->input()->name('name')
->placeholder('Name')
-> ->label('Select item')
->add()
->input('0a0b0c0d', 'hidden')->name('token')
->form()
->fieldSet('Group 2')
->add()
->radio('choose', array('r'=>'Red', 'g'=>'Green', 'b'=>'Blue'))
->add()
->space()
->add()
->textarea('', array('name'=>'desc'))->label('Description')
->rows(5)->addClass('span4')
->help('Input short description about it', 'help-block')
->form()
->checkbox('confirm', array('Confirm'))
->form()
->section('form-actions')
->add()
->buttonSubmit('Send as GET')
->addClass('btn btn-primary')
->add()
->space('h')
->add()
->buttonSubmit('Send as POST')
->addClass('btn btn-success')
->formMethod('post')
;
$html = new Dom\Html();
$html
->root()->attr(array('lang' => 'en'));
$html
->meta(array('charset' => Html::ENCODING))
->title('volux\Dom\Form Test')
->stylesheet('//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css')
->body()
->append('div')->attr('class', 'row')
->append('div')->attr('class', 'span4 offset1')
->append($form) /* point to add builded form to main html */
;
echo $html;