2 /* ***** BEGIN LICENSE BLOCK *****
4 * The contents of this file are subject to Austrian copyright reegulations
5 * ("Urheberrecht"); you may not use this file except in compliance with
7 * This contents and any derived work, if it gets distributed in any way,
8 * is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
9 * either express or implied.
11 * The Original Code is KaiRo's extended DOM document classes.
13 * The Initial Developer of the Original Code is
14 * KaiRo - Robert Kaiser.
15 * Portions created by the Initial Developer are Copyright (C) 2010
16 * the Initial Developer. All Rights Reserved.
18 * Contributor(s): Robert Kaiser <kairo@kairo.at>
20 * ***** END LICENSE BLOCK ***** */
22 class ExtendedDocument extends DOMDocument {
23 // ExtendedDocument PHP class
24 // this extends the general PHP DOM Document class to simplify some usual constructs
26 // function __construct([$version], [$encoding])
28 // construct a new DOM Document that uses our element definitions
31 // the default XML header
33 // private $xhtmldtype
34 // the XHTML doctype to use by default
36 // function appendElement($name, [$value])
37 // appends a DOMDocument::createElement() as a child of this document (see there for params)
38 // returns the new child
40 // function appendElementXML($name, $xmldata)
41 // appends a DOMDocument::createElement() with the given name as a child of this document,
42 // with an ExtendedDocument::createXMLFragment() of the given XML data inside
43 // returns the new child
45 // function appendLink($target, [$value])
46 // appends an ExtendedDocument::createElementLink() as a child of this document (see there for params)
47 // returns the new child
49 // function appendImage($src, [$alt_text])
50 // appends an ExtendedDocument::createElementImage() as a child of this document (see there for params)
51 // returns the new child
53 // function appendFormDiv($action, $method, $name)
54 // appends an ExtendedDocument::createElementForm() as a child of this document (see there for params)
55 // returns an HTML <div> that is a child of the new child
57 // function appendInputHidden($name, $value)
58 // appends an ExtendedDocument::createElementInputHidden() as a child of this document (see there for params)
59 // returns the new child
61 // function appendInputText($name, $maxlength, $size, [$id], [$value])
62 // appends an ExtendedDocument::createElementInputText() as a child of this document (see there for params)
63 // returns the new child
65 // function appendInputRadio($name, $id, $value, $checked)
66 // appends an ExtendedDocument::createElementInputRadio() as a child of this document (see there for params)
67 // returns the new child
69 // function appendInputCheckbox($name, $id, $value, $checked)
70 // appends an ExtendedDocument::createElementInputCheckbox() as a child of this document (see there for params)
71 // returns the new child
73 // function appendInputSubmit($value)
74 // appends an ExtendedDocument::createElementInputSubmit() as a child of this document (see there for params)
75 // returns the new child
77 // function appendTextArea($name, $columns, $rows, [$id], [$value])
78 // appends an ExtendedDocument::createElementTextArea() as a child of this document (see there for params)
79 // returns the new child
81 // function appendElementSelect($name, [$id], [$options], [$default])
82 // appends an ExtendedDocument::createElementSelect() as a child of this document (see there for params)
83 // returns the new child
85 // function appendElementOption($key, $desc, [$selected])
86 // appends an ExtendedDocument::createElementOption() as a child of this document (see there for params)
87 // returns the new child
89 // function appendLabel($for_id, $value)
90 // appends an ExtendedDocument::createElementLabel() as a child of this document (see there for params)
91 // returns the new child
93 // function appendText($text)
94 // appends a DOMDocument::createTextNode() as a child of this document (see there for params)
95 // returns the new child
97 // function appendHTMLMarkup($htmldata, [$parentNode])
98 // appends a representation of the HTML data as children of the given parent node, by default this document
101 // function appendXMLMarkup($xmldata, [$parentNode])
102 // appends a representation of the XML data as children of the given parent node, by default this document
105 // function appendJSElement($jsdata)
106 // appends an ExtendedDocument::createElementJS() as a child of this document (see there for params)
109 // function appendCOMElement($module, $attributes)
110 // appends an ExtendedDocument::createCOMElement() as a child of this document (see there for params)
111 // returns the new child
113 // function createElementLink($target, [$value])
114 // returns an ExtendedElement that is an HTML <a> with the given target (href) and (optional) value
116 // function createElementImage($src, [$alt_text])
117 // returns an ExtendedElement that is an HTML <img> with the given (src) and alt attributes (set to '' by default)
119 // function createElementForm($action, $method, $name)
120 // returns an ExtendedElement that is an HTML <div> that is a child of an HTML <form>
121 // with the given action, method, and name
123 // function createElementInputHidden($name, $value)
124 // returns an ExtendedElement that is an HTML <input> of type 'hidden' with the given name and value
126 // function createElementInputText($name, $maxlength, $size, [$id], [$value])
127 // returns an ExtendedElement that is an HTML <input> of type 'text' with the given name, maxlength, size,
128 // and optionally id and value
130 // function createElementInputRadio($name, $id, $value, $checked)
131 // returns an ExtendedElement that is an HTML <input> of type 'radio' with the given name, id, value and
134 // function createElementInputCheckbox($name, $id, $value, $checked)
135 // returns an ExtendedElement that is an HTML <input> of type 'checkbox' with the given name, id, value and
138 // function createElementInputSubmit($value)
139 // returns an ExtendedElement that is an HTML <input> of type 'submit' with the given name and value
141 // function createElementTextArea($name, $columns, $rows, [$id], [$value])
142 // returns an ExtendedElement that is an HTML <textarea> with the given name, columns, rows,
143 // and optionally id and value
145 // function createElementSelect($name, [$id], [$options], [$default])
146 // returns an ExtendedElement that is an HTML <select> with the given name, and optionally id,
147 // array of options (key => description) and key of the by-default selected entry
149 // function createElementOption($key, $desc, [$selected])
150 // returns an ExtendedElement that is an HTML <option> with the given key (value) and description (content)
151 // and optionally bool that tells if the entry is selected
153 // function createElementLabel($for_id, $value)
154 // returns an ExtendedElement that is an HTML <label> with the given 'for' and value
156 // function createElementJS($jsdata)
157 // returns an ExtendedElement that is an HTML <script> of JavaScript type with the JS data inside
159 // function createCOMElement($module, $attributes)
160 // returns an ExtendedElement that is in COM_NS namespace, with the given module as name and the
161 // given name=>value array as attributes
163 function __construct($version = '1.0', $encoding = 'utf-8') {
164 // make sure the default DOMDocument constructor runs
165 parent::__construct($version, $encoding);
166 $this->registerNodeClass('DOMElement', 'ExtendedElement');
167 $this->registerNodeClass('DOMDocumentFragment', 'ExtendedDocumentFragment');
170 function appendElement($name, $value = '') {
171 return $this->appendChild($this->createElement($name, $value));
173 function appendElementXML($name, $xmldata) {
174 $aelem = $this->appendChild($this->createElement($name));
175 $aelem->appendXMLMarkup($xmldata);
176 //$aelem->appendChild($this->createXMLFragment($xmldata));
179 function appendLink($target, $value = '') {
180 return $this->appendChild($this->createElementLink($target, $value));
182 function appendImage($src, $alt_text = '') {
183 return $this->appendChild($this->createElementImage($src, $alt_text));
185 function appendFormDiv($action, $method, $name) {
186 $formelem = $this->appendChild($this->createElementForm($action, $method, $name));
187 return $formelem->appendElement('div');
189 function appendInputHidden($name, $value) {
190 return $this->appendChild($this->createElementInputHidden($name, $value));
192 function appendInputText($name, $maxlength, $size, $id = null, $value = null) {
193 return $this->appendChild($this->createElementInputText($name, $maxlength, $size, $id, $value));
195 function appendInputRadio($name, $id, $value, $checked) {
196 return $this->appendChild($this->createElementInputRadio($name, $id, $value, $checked));
198 function appendInputCheckbox($name, $id, $value, $checked) {
199 return $this->appendChild($this->createElementInputCheckbox($name, $id, $value, $checked));
201 function appendInputSubmit($value) {
202 return $this->appendChild($this->createElementInputSubmit($value));
204 function appendTextArea($name, $columns, $rows, $id = null, $value = null) {
205 return $this->appendChild($this->createElementTextArea($name, $columns, $rows, $id, $value));
207 function appendElementSelect($name, $id = null, $options = array(), $default = null) {
208 return $this->appendChild($this->createElementSelect($name, $id, $options, $default));
210 function appendElementOption($key, $desc, $selected = false) {
211 return $this->appendChild($this->createElementOption($key, $desc, $selected));
213 function appendLabel($for_id, $value) {
214 return $this->appendChild($this->createElementLabel($for_id, $value));
216 function appendText($text) {
217 return $this->appendChild($this->createTextNode($text));
219 function appendJSElement($jsdata) {
220 $this->appendChild($this->createElementJS($jsdata));
222 function appendCOMElement($module, $attributes) {
223 $this->appendChild($this->ownerDocument->createCOMElement($module, $attributes));
226 function appendHTMLMarkup($htmldata, $parentNode = null) {
227 if (is_null($parentNode)) { $parentNode =& $this; }
228 // XXX: just a workaround for now!
229 $parentNode->appendChild($this->createCDATASection($htmldata));
232 function appendXMLMarkup($xmldata, $parentNode = null) {
233 if (is_null($parentNode)) { $parentNode =& $this; }
234 $tmpdoc = new ExtendedDocument;
235 $tmpxml = '<?xml version="1.0" encoding="utf-8"?>'."\n";
236 $tmpxml .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'."\n";
237 $tmpxml .= '<root>'.$xmldata.'</root>';
238 $tmpdoc->loadXML($tmpxml);
239 foreach ($tmpdoc->getElementsByTagName('root')->item(0)->childNodes as $child) {
240 $parentNode->appendChild($this->importNode($child, true));
244 function createElementLink($target, $value = '') {
245 $link = $this->createElement('a', $value);
246 $link->setAttribute('href', $target); // XXX: take care of & etc. in links
250 function createElementImage($src, $alt_text = '') {
251 $link = $this->createElement('img');
252 $link->setAttribute('src', $src);
253 $link->setAttribute('alt', $alt_text);
257 function createElementForm($action, $method, $name) {
258 $formelem = $this->createElement('form');
259 $formelem->setAttribute('action', $action);
260 $formelem->setAttribute('method', $method);
261 $formelem->setAttribute('name', $name);
265 function createElementInputHidden($name, $value) {
266 $hidden = $this->createElement('input');
267 $hidden->setAttribute('type', 'hidden');
268 $hidden->setAttribute('name', $name);
269 $hidden->setAttribute('value', $value);
273 function createElementInputText($name, $maxlength, $size, $id = null, $value = null) {
274 $txfield = $this->createElement('input');
275 $txfield->setAttribute('type', 'text');
276 if (!is_null($id)) { $txfield->setAttribute('id', $id); }
277 $txfield->setAttribute('name', $name);
278 $txfield->setAttribute('maxlength', $maxlength);
279 $txfield->setAttribute('size', $size);
280 if (!is_null($value)) { $txfield->setAttribute('value', $value); }
284 function createElementInputRadio($name, $id, $value, $checked) {
285 $radio = $this->createElement('input');
286 $radio->setAttribute('type', 'radio');
287 $radio->setAttribute('name', $name);
288 $radio->setAttribute('id', $id);
289 $radio->setAttribute('value', $value);
290 if ($checked) { $radio->setAttribute('checked', ''); }
294 function createElementInputCheckbox($name, $id, $value, $checked) {
295 $cbox = $this->createElement('input');
296 $cbox->setAttribute('type', 'checkbox');
297 $cbox->setAttribute('name', $name);
298 $cbox->setAttribute('id', $id);
299 $cbox->setAttribute('value', $value);
300 if ($checked) { $cbox->setAttribute('checked', ''); }
304 function createElementInputSubmit($value) {
305 $submitbtn = $this->createElement('input');
306 $submitbtn->setAttribute('type', 'submit');
307 $submitbtn->setAttribute('value', $value);
311 function createElementTextArea($name, $columns, $rows, $id = null, $value = null) {
312 $txtarea = $this->createElement('textarea', $value);
313 $txtarea->setAttribute('name', $name);
314 $txtarea->setAttribute('cols', $columns);
315 $txtarea->setAttribute('rows', $rows);
316 if (!is_null($id)) { $txtarea->setAttribute('id', $id); }
320 function createElementSelect($name, $id = null, $options = array(), $default = null) {
321 $select = $this->createElement('select');
322 $select->setAttribute('name', $name);
323 if (!is_null($id)) { $select->setAttribute('id', $id); }
324 foreach ($options as $key => $desc) {
325 $select->appendElementOption($key, $desc, ($key == $default));
330 function createElementOption($key, $desc, $selected = false) {
331 $option = $this->createElement('option', $desc);
332 $option->setAttribute('value', $key);
333 if ($selected) { $option->setAttribute('selected', ''); }
337 function createElementLabel($for_id, $value) {
338 $label = $this->createElement('label', $value);
339 $label->setAttribute('for', $for_id);
343 function createElementJS($jsdata) {
344 $jselem = $this->createElement('script');
345 $jselem->setAttribute('type', 'text/javascript');
346 $jselem->appendChild($this->createCDATASection($jsdata));
350 function createCOMElement($module, $attributes) {
351 $com_elem = $this->createElementNS(COM_NS, $module);
352 if (is_array($attributes) && count($attributes)) {
353 foreach ($attributes as $name=>$value) {
354 $com_elem->setAttribute($name, $value);
361 class ExtendedElement extends DOMElement {
362 // ExtendedElement PHP class
363 // this extends the general PHP DOM Element class to simplify some usual constructs
365 // function appendElement($name, [$value])
366 // appends a DOMDocument::createElement() as a child of this element (see there for params)
367 // returns the new child
369 // function appendElementXML($name, $xmldata)
370 // appends a DOMDocument::createElement() with the given name as a child of this element,
371 // with an ExtendedDocument::createXMLFragment() of the given XML data inside
372 // returns the new child
374 // function appendLink($target, [$value])
375 // appends an ExtendedDocument::createElementLink() as a child of this element (see there for params)
376 // returns the new child
378 // function appendImage($src, [$alt_text])
379 // appends an ExtendedDocument::createElementImage() as a child of this document (see there for params)
380 // returns the new child
382 // function appendFormDiv($action, $method, $name)
383 // appends an ExtendedDocument::createElementForm() as a child of this element (see there for params)
384 // returns an HTML <div> that is a child of the new child
386 // function appendInputHidden($name, $value)
387 // appends an ExtendedDocument::createElementInputHidden() as a child of this element (see there for params)
388 // returns the new child
390 // function appendInputText($name, $maxlength, $size, [$id], [$value])
391 // appends an ExtendedDocument::createElementInputText() as a child of this element (see there for params)
392 // returns the new child
394 // function appendInputRadio($name, $id, $value, $checked)
395 // appends an ExtendedDocument::createElementInputRadio() as a child of this element (see there for params)
396 // returns the new child
398 // function appendInputCheckbox($name, $id, $value, $checked)
399 // appends an ExtendedDocument::createElementInputCheckbox() as a child of this element (see there for params)
400 // returns the new child
402 // function appendInputSubmit($value)
403 // appends an ExtendedDocument::createElementInputSubmit() as a child of this element (see there for params)
404 // returns the new child
406 // function appendTextArea($name, $columns, $rows, [$id], [$value])
407 // appends an ExtendedDocument::createElementTextArea() as a child of this element (see there for params)
408 // returns the new child
410 // function appendElementSelect($name, [$id], [$options], [$default])
411 // appends an ExtendedDocument::createElementSelect() as a child of this element (see there for params)
412 // returns the new child
414 // function appendElementOption($key, $desc, [$selected])
415 // appends an ExtendedDocument::createElementOption() as a child of this element (see there for params)
416 // returns the new child
418 // function appendLabel($for_id, $value)
419 // appends an ExtendedDocument::createElementLabel() as a child of this element (see there for params)
420 // returns the new child
422 // function appendText($text)
423 // appends a DOMDocument::createTextNode() as a child of this element (see there for params)
424 // returns the new child
426 // function appendHTMLMarkup($htmldata)
427 // appends a representation of the HTML data as children of this element
430 // function appendXMLMarkup($xmldata)
431 // appends a representation of the XML data as children of this element
434 // function appendJSElement($jsdata)
435 // appends an ExtendedDocument::createElementJS() as a child of this element (see there for params)
438 // function appendCOMElement($module, $attributes)
439 // appends an ExtendedDocument::createCOMElement() as a child of this element (see there for params)
440 // returns the new child
442 function appendElement($name, $value = '') {
443 return $this->appendChild($this->ownerDocument->createElement($name, $value));
445 function appendElementXML($name, $xmldata) {
446 $aelem = $this->appendChild($this->ownerDocument->createElement($name));
447 $aelem->appendXMLMarkup($xmldata);
450 function appendLink($target, $value = '') {
451 return $this->appendChild($this->ownerDocument->createElementLink($target, $value));
453 function appendImage($src, $alt_text = '') {
454 return $this->appendChild($this->ownerDocument->createElementImage($src, $alt_text));
456 function appendFormDiv($action, $method, $name) {
457 $formelem = $this->appendChild($this->ownerDocument->createElementForm($action, $method, $name));
458 return $formelem->appendElement('div');
460 function appendInputHidden($name, $value) {
461 return $this->appendChild($this->ownerDocument->createElementInputHidden($name, $value));
463 function appendInputText($name, $maxlength, $size, $id = null, $value = null) {
464 return $this->appendChild($this->ownerDocument->createElementInputText($name, $maxlength, $size, $id, $value));
466 function appendInputRadio($name, $id, $value, $checked) {
467 return $this->appendChild($this->ownerDocument->createElementInputRadio($name, $id, $value, $checked));
469 function appendInputCheckbox($name, $id, $value, $checked) {
470 return $this->appendChild($this->ownerDocument->createElementInputCheckbox($name, $id, $value, $checked));
472 function appendInputSubmit($value) {
473 return $this->appendChild($this->ownerDocument->createElementInputSubmit($value));
475 function appendTextArea($name, $columns, $rows, $id = null, $value = null) {
476 return $this->appendChild($this->ownerDocument->createElementTextArea($name, $columns, $rows, $id, $value));
478 function appendElementSelect($name, $id = null, $options = array(), $default = null) {
479 return $this->appendChild($this->ownerDocument->createElementSelect($name, $id, $options, $default));
481 function appendElementOption($key, $desc, $selected = false) {
482 return $this->appendChild($this->ownerDocument->createElementOption($key, $desc, $selected));
484 function appendLabel($for_id, $value) {
485 return $this->appendChild($this->ownerDocument->createElementLabel($for_id, $value));
487 function appendText($text) {
488 return $this->appendChild($this->ownerDocument->createTextNode($text));
490 function appendHTMLMarkup($htmldata) {
491 $this->ownerDocument->appendHTMLMarkup($htmldata, $this);
493 function appendXMLMarkup($xmldata) {
494 $this->ownerDocument->appendXMLMarkup($xmldata, $this);
496 function appendJSElement($jsdata) {
497 $this->appendChild($this->ownerDocument->createElementJS($jsdata));
499 function appendCOMElement($module, $attributes) {
500 $this->appendChild($this->ownerDocument->createCOMElement($module, $attributes));
504 class ExtendedDocumentFragment extends DOMDocumentFragment {
505 // ExtendedDocumentFragment PHP class
506 // this extends the general PHP DOM Document Fragment class to simplify some usual constructs
508 // function appendElement($name, [$value])
509 // appends a DOMDocument::createElement() as a child of this fragment (see there for params)
510 // returns the new child
512 // function appendElementXML($name, $xmldata)
513 // appends a DOMDocument::createElement() with the given name as a child of this fragment,
514 // with an ExtendedDocument::createXMLFragment() of the given XML data inside
515 // returns the new child
517 // function appendLink($target, [$value])
518 // appends an ExtendedDocument::createElementLink() as a child of this fragment (see there for params)
519 // returns the new child
521 // function appendImage($src, [$alt_text])
522 // appends an ExtendedDocument::createElementImage() as a child of this document (see there for params)
523 // returns the new child
525 // function appendFormDiv($action, $method, $name)
526 // appends an ExtendedDocument::createElementForm() as a child of this fragment (see there for params)
527 // returns an HTML <div> that is a child of the new child
529 // function appendInputHidden($name, $value)
530 // appends an ExtendedDocument::createElementInputHidden() as a child of this fragment (see there for params)
531 // returns the new child
533 // function appendInputText($name, $maxlength, $size, [$id], [$value])
534 // appends an ExtendedDocument::createElementInputText() as a child of this fragment (see there for params)
535 // returns the new child
537 // function appendInputRadio($name, $id, $value, $checked)
538 // appends an ExtendedDocument::createElementInputRadio() as a child of this fragment (see there for params)
539 // returns the new child
541 // function appendInputCheckbox($name, $id, $value, $checked)
542 // appends an ExtendedDocument::createElementInputCheckbox() as a child of this fragment (see there for params)
543 // returns the new child
545 // function appendInputSubmit($value)
546 // appends an ExtendedDocument::createElementInputSubmit() as a child of this fragment (see there for params)
547 // returns the new child
549 // function appendTextArea($name, $columns, $rows, [$id], [$value])
550 // appends an ExtendedDocument::createElementTextArea() as a child of this fragment (see there for params)
551 // returns the new child
553 // function appendElementSelect($name, [$id], [$options], [$default])
554 // appends an ExtendedDocument::createElementSelect() as a child of this fragment (see there for params)
555 // returns the new child
557 // function appendElementOption($key, $desc, [$selected])
558 // appends an ExtendedDocument::createElementOption() as a child of this fragment (see there for params)
559 // returns the new child
561 // function appendLabel($for_id, $value)
562 // appends an ExtendedDocument::createElementLabel() as a child of this fragment (see there for params)
563 // returns the new child
565 // function appendText($text)
566 // appends a DOMDocument::createTextNode() as a child of this fragment (see there for params)
567 // returns the new child
569 // function appendHTMLMarkup($htmldata)
570 // appends a representation of the HTML data as children of this fragment
573 // function appendXMLMarkup($xmldata)
574 // appends a representation of the XML data as children of this fragment
577 // function appendJSElement($jsdata)
578 // appends an ExtendedDocument::createElementJS() as a child of this fragment (see there for params)
581 // function appendCOMElement($module, $attributes)
582 // appends an ExtendedDocument::createCOMElement() as a child of this fragment (see there for params)
583 // returns the new child
585 function appendElement($name, $value = '') {
586 return $this->appendChild($this->ownerDocument->createElement($name, $value));
588 function appendElementXML($name, $xmldata) {
589 $aelem = $this->appendChild($this->ownerDocument->createElement($name));
590 $aelem->appendXMLMarkup($xmldata);
593 function appendLink($target, $value = '') {
594 return $this->appendChild($this->ownerDocument->createElementLink($target, $value));
596 function appendImage($src, $alt_text = '') {
597 return $this->appendChild($this->ownerDocument->createElementImage($src, $alt_text));
599 function appendFormDiv($action, $method, $name) {
600 $formelem = $this->appendChild($this->ownerDocument->createElementForm($action, $method, $name));
601 return $formelem->appendElement('div');
603 function appendInputHidden($name, $value) {
604 return $this->appendChild($this->ownerDocument->createElementInputHidden($name, $value));
606 function appendInputText($name, $maxlength, $size, $id = null, $value = null) {
607 return $this->appendChild($this->ownerDocument->createElementInputText($name, $maxlength, $size, $id, $value));
609 function appendInputRadio($name, $id, $value, $checked) {
610 return $this->appendChild($this->ownerDocument->createElementInputRadio($name, $id, $value, $checked));
612 function appendInputCheckbox($name, $id, $value, $checked) {
613 return $this->appendChild($this->ownerDocument->createElementInputCheckbox($name, $id, $value, $checked));
615 function appendInputSubmit($value) {
616 return $this->appendChild($this->ownerDocument->createElementInputSubmit($value));
618 function appendTextArea($name, $columns, $rows, $id = null, $value = null) {
619 return $this->appendChild($this->ownerDocument->createElementTextArea($name, $columns, $rows, $id, $value));
621 function appendElementSelect($name, $id = null, $options = array(), $default = null) {
622 return $this->appendChild($this->ownerDocument->createElementSelect($name, $id, $options, $default));
624 function appendElementOption($key, $desc, $selected = false) {
625 return $this->appendChild($this->ownerDocument->createElementOption($key, $desc, $selected));
627 function appendLabel($for_id, $value) {
628 return $this->appendChild($this->ownerDocument->createElementLabel($for_id, $value));
630 function appendText($text) {
631 return $this->appendChild($this->ownerDocument->createTextNode($text));
633 function appendHTMLMarkup($htmldata) {
634 $this->ownerDocument->appendHTMLMarkup($htmldata, $this);
636 function appendXMLMarkup($xmldata) {
637 $this->ownerDocument->appendXMLMarkup($xmldata, $this);
639 function appendJSElement($jsdata) {
640 $this->appendChild($this->ownerDocument->createElementJS($jsdata));
642 function appendCOMElement($module, $attributes) {
643 $this->appendChild($this->ownerDocument->createCOMElement($module, $attributes));