root/trunk/examples/api_quickstart.php

Revision 26, 1.0 kB (checked in by argh, 3 years ago)

Removed unneeded code.

Line 
1 <?php
2 /**
3  * Quickstart example
4  *
5  * @access        public
6  * @package        patXMLPretty
7  * @subpackage    Examples
8  * @author        Sebastian Mordziol <argh@php-tools.net>
9  * @license        LGPL, see license.txt for details
10  * @link        http://www.php-tools.net
11  */
12
13     /**
14      * Main examples prepend file, needed *only* for the examples framework!
15      */
16     include_once 'patExampleGen/prepend.php';
17     $exampleGen->displayHead( 'Example' );
18
19
20     // EXAMPLE START ------------------------------------------------------
21
22     /**
23      * The patXMLPretty main class
24      */
25     require_once $neededFiles['patXMLPretty'];
26
27     /**
28      * patErrorManager class
29      */
30     require_once $neededFiles['patErrorManager'];
31
32
33     // create a new XML pretty object
34     $pretty =& new patXMLPretty;
35
36     // highlight a file
37     $highlighted = $pretty->parseFile( 'data/sitemap.xml' );
38     if( patErrorManager::isError( $highlighted ) ) {
39         die( $highlighted->getMessage() );
40     }
41
42     displaySection( 'Highlighted source', $highlighted );
43
44
45     // EXAMPLE END ------------------------------------------------------
46     $exampleGen->displayFooter();
47 ?>
48
Note: See TracBrowser for help on using the browser.