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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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
13 <table class="tutorial-nav-box">
14 <tr>
15 <td style="width: 30%">
16 <a href="../phpHtmlLib/tutorial_Container.cls.html" class="nav-button">Previous</a>
17 </td>
18 <td style="text-align: center">
19 <a href="../phpHtmlLib/tutorial_Container.cls.html" class="nav-button">Up</a>
20 </td>
21 <td style="text-align: right; width: 30%">
22 <a href="../phpHtmlLib/tutorial_HTMLTagClass.cls.html" class="nav-button">Next</a>
23 </td>
24 </tr>
25 <tr>
26 <td style="width: 30%">
27 <span class="detail">Container</span>
28 </td>
29 <td style="text-align: center">
30 <span class="detail">Container</span>
31 </td>
32 <td style="text-align: right; width: 30%">
33 <span class="detail">HTMLagClass</span>
34 </td>
35 </tr>
36 </table>
37
38 <div><a name=""></a><div class="ref-title-box"><h1 class="ref-title">XMLTagClass</h1>
39 <h2 class="ref-purpose">This is the base tag class.</h2></div>
40 <div class="ref-synopsis"><span class="author">by Walter A. Boring IV
41 <div class="author-blurb"><a href="mailto:waboring@3gstech.com">mailto:waboring@3gstech.com</a></div></span>
42 <div class="notes">March 2004, Walter A. Boring IV</div>
43 <div class="release-info">(phpHtmlLib 2.4.x)</div></div>
44 <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>
45 <p>Each XML tag is broken down into it's name, attributes, content and an optional
46 closing tag. This is also true for HTML tags.</p></span>
47
48 <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.
49 The first parameter is the name of the tag to create. The second parameter is an array
50 of key value pairs that make up the attributes and values for the tag. The third parameters is
51 an infinite list of parameters that will make up the content portion of the tag.</p>
52 <pre class="example"><pre>$test = new XMLTagClass('foo', array('test' =&gt; 1), 'some content');
53 print $test-&gt;render();</pre></pre></p>
54
55 <p>Output:
56 <pre class="example"><pre>&lt;foo test=&quot;1&quot;&gt;some content&lt;/foo&gt;</pre></pre></p></span>
57
58 <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
59 to xml_tag().</p>
60 <pre class="example"><pre>$test = xml_tag('foo', array('test' =&gt; 1), 'some content');
61 print $test-&gt;render();</pre></pre></p>
62
63 <p>Output:
64 <pre class="example"><pre>&lt;foo test=&quot;1&quot;&gt;some content&lt;/foo&gt;</pre></pre></p></span>
65
66 <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,
67 then a closing tag is built, otherwise it closes the tag in the open tag.
68
69 NOTE: you can force a close tag to be required by defining a child of the XMLTagClass and setting
70 the flag the forces the close tag.</p>
71 <pre class="example"><pre>$test = xml_tag('foo', array('test' =&gt; 1));
72 print $test-&gt;render();</pre></pre></p>
73
74 <p>Output:
75 <pre class="example"><pre>&lt;foo test=&quot;1&quot; /&gt;</pre></pre></p></span></div>
76
77 <table class="tutorial-nav-box">
78 <tr>
79 <td style="width: 30%">
80 <a href="../phpHtmlLib/tutorial_Container.cls.html" class="nav-button">Previous</a>
81 </td>
82 <td style="text-align: center">
83 <a href="../phpHtmlLib/tutorial_Container.cls.html" class="nav-button">Up</a>
84 </td>
85 <td style="text-align: right; width: 30%">
86 <a href="../phpHtmlLib/tutorial_HTMLTagClass.cls.html" class="nav-button">Next</a>
87 </td>
88 </tr>
89 <tr>
90 <td style="width: 30%">
91 <span class="detail">Container</span>
92 </td>
93 <td style="text-align: center">
94 <span class="detail">Container</span>
95 </td>
96 <td style="text-align: right; width: 30%">
97 <span class="detail">HTMLagClass</span>
98 </td>
99 </tr>
100 </table>
101
102 <p class="notes" id="credit">
103 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>
104 </p>
105 </div></body>
106 </html>

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