<?php
//include class
include('xml_parser.php');
//create new instance of xml_parser
$xml=new xml_parser();
//load data from file with
$xml->load('sample.xml');
// or use $xml->loadData() to load plaintext data
// $xml->loadData('<xml><data>asdfasdf</data></xml>');
//return nice parsed array
print_r($xml->parse());
//and some other feature -> get the xml encoding
$xml->getEncoding();
?>
|