/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/examples/example5.php
ViewVC logotype

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/examples/example5.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Sat Feb 22 21:07:21 2003 UTC (21 years, 4 months ago) by jonen
Branch: MAIN
Changes since 1.1: +0 -0 lines
+ updated whole lib to version 2.2.1 (new FormProcessing since 2.2.0!)

1 jonen 1.1 <?php
2    
3     /**
4     * Another example of how to build an
5     * XML Document with the XML support
6     * that phpHtmlLib provides.
7     *
8     *
9     * $Id: example5.php,v 1.2 2002/11/08 22:37:05 hemna Exp $
10     *
11     * @author Walter A. Boring IV <waboring@buildabetterweb.com>
12     * @package phpHtmlLib
13     * @subpackage examples
14     * @version 2.0.0
15     *
16     */
17    
18     /**
19     * Include the phphtmllib libraries
20     */
21     include_once("includes.inc");
22    
23     //build the xml document object with a
24     //root xml tag of <example5>, and a <!DOCTYPE>
25     //link attribute of "some doctype link"
26     $xmldoc = new XMLDocumentClass("example5", "http://foo.com/DTDS/mail.dtd");
27    
28     //make sure we have the XMLDocumentClass automatically
29     //output the correct http Content-Type value
30     $xmldoc->show_http_header();
31    
32     //add some tags to the root element
33     $xmldoc->add( xml_tag("testing", array(), "foo",
34     xml_tag("blah", array("value" => 1)) ) );
35    
36     //build an array that represents
37     //xml tags and their values.
38     $arr = array("Foo" => array("bar" => "bleh",
39     "bar" => array("testing" => "php")));
40     //add those tags from the array
41     $xmldoc->add( array_to_xml_tree( $arr ) );
42    
43     //this will render the entire page
44     print $xmldoc->render();
45     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed