/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/doc/phpHtmlLib/tutorial_XMLTagClass.cls.html
ViewVC logotype

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/doc/phpHtmlLib/tutorial_XMLTagClass.cls.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu May 6 16:57:01 2004 UTC (20 years, 3 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/html
 updated all to v2.4.1 - Apr 01, 2004

1 jonen 1.1 <?xml version="1.0" encoding="iso-8859-1"?>
2     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3     <html xmlns="http://www.w3.org/1999/xhtml">
4     <head>
5     <!-- template designed by Marco Von Ballmoos -->
6     <title>XMLTagClass</title>
7     <link rel="stylesheet" href="../media/stylesheet.css" />
8     <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
9     </head>
10     <body>
11     <div class="page-body">
12     <table class="tutorial-nav-box">
13     <tr>
14     <td style="width: 30%">
15     <a href="../phpHtmlLib/tutorial_Container.cls.html" class="nav-button">Previous</a>
16     </td>
17     <td style="text-align: center">
18     <a href="../phpHtmlLib/tutorial_Container.cls.html" class="nav-button">Up</a>
19     </td>
20     <td style="text-align: right; width: 30%">
21     <a href="../phpHtmlLib/tutorial_HTMLTagClass.cls.html" class="nav-button">Next</a>
22     </td>
23     </tr>
24     <tr>
25     <td style="width: 30%">
26     <span class="detail">Container</span>
27     </td>
28     <td style="text-align: center">
29     <span class="detail">Container</span>
30     </td>
31     <td style="text-align: right; width: 30%">
32     <span class="detail">HTMLagClass</span>
33     </td>
34     </tr>
35     </table>
36    
37     <div><a name=""></a><div class="ref-title-box"><h1 class="ref-title">XMLTagClass</h1>
38     <h2 class="ref-purpose">This is the base tag class.</h2></div>
39     <div class="ref-synopsis"><span class="author">by Walter A. Boring IV
40     <div class="author-blurb"><a href="mailto:waboring@3gstech.com">mailto:waboring@3gstech.com</a></div></span>
41     <div class="notes">March 2004, Walter A. Boring IV</div>
42     <div class="release-info">(phpHtmlLib 2.4.x)</div></div>
43     <span><a name="description"></a><h2 class="title">Description</h2><p>This class is the main tag class for all XML tags that phpHtmlLib supports.</p>
44     <p>Each XML tag is broken down into it's name, attributes, content and an optional
45     closing tag. This is also true for HTML tags.</p></span>
46    
47     <span><a name="constructor"></a><h2 class="title">Creating an XML tag object.</h2><p><p>The constructor of the XML tag object has 3 main parameters.
48     The first parameter is the name of the tag to create. The second parameter is an array
49     of key value pairs that make up the attributes and values for the tag. The third parameters is
50     an infinite list of parameters that will make up the content portion of the tag.</p>
51     <pre class="example"><pre>$test = new XMLTagClass('foo', array('test' =&gt; 1), 'some content');
52     print $test-&gt;render();</pre></pre></p>
53    
54     <p>Output:
55     <pre class="example"><pre>&lt;foo test=&quot;1&quot;&gt;some content&lt;/foo&gt;</pre></pre></p></span>
56    
57     <span><a name="helper"></a><h2 class="title">Creating an XML tag object with a function.</h2><p><p>The alternative way to create the same xml tag can be accomplised with a call
58     to xml_tag().</p>
59     <pre class="example"><pre>$test = xml_tag('foo', array('test' =&gt; 1), 'some content');
60     print $test-&gt;render();</pre></pre></p>
61    
62     <p>Output:
63     <pre class="example"><pre>&lt;foo test=&quot;1&quot;&gt;some content&lt;/foo&gt;</pre></pre></p></span>
64    
65     <span><a name="closetag"></a><h2 class="title">Closing tag</h2><p><p>The XMLTagClass automatically determines if the closing tag is needed. If there is content in the tag,
66     then a closing tag is built, otherwise it closes the tag in the open tag.
67    
68     NOTE: you can force a close tag to be required by defining a child of the XMLTagClass and setting
69     the flag the forces the close tag.</p>
70     <pre class="example"><pre>$test = xml_tag('foo', array('test' =&gt; 1));
71     print $test-&gt;render();</pre></pre></p>
72    
73     <p>Output:
74     <pre class="example"><pre>&lt;foo test=&quot;1&quot; /&gt;</pre></pre></p></span></div>
75    
76     <table class="tutorial-nav-box">
77     <tr>
78     <td style="width: 30%">
79     <a href="../phpHtmlLib/tutorial_Container.cls.html" class="nav-button">Previous</a>
80     </td>
81     <td style="text-align: center">
82     <a href="../phpHtmlLib/tutorial_Container.cls.html" class="nav-button">Up</a>
83     </td>
84     <td style="text-align: right; width: 30%">
85     <a href="../phpHtmlLib/tutorial_HTMLTagClass.cls.html" class="nav-button">Next</a>
86     </td>
87     </tr>
88     <tr>
89     <td style="width: 30%">
90     <span class="detail">Container</span>
91     </td>
92     <td style="text-align: center">
93     <span class="detail">Container</span>
94     </td>
95     <td style="text-align: right; width: 30%">
96     <span class="detail">HTMLagClass</span>
97     </td>
98     </tr>
99     </table>
100    
101     <p class="notes" id="credit">
102     Documentation generated on Thu, 1 Apr 2004 09:37:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC2</a>
103     </p>
104     </div></body>
105     </html>

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