69 {
70echo "-5";
72 }
73
74
76{
78echo "-6";
79 $this->myDOMNode=$aDOMAttr;
80 }
81
83echo "-7";
84 return $this->myDOMNode->name;
85 }
86
88echo "-8";
89 return $this->myDOMNode->specified;
90 }
91
93echo "-9";
94 return $this->myDOMNode->value;
95 }
96}
97
98
100{
101
103 {
104echo "-A";
105 $this->myDOMNode=new DOMDocument();
107 }
108
109
111 {
112echo "-B";
113 $myAttr=$this->myDOMNode->createAttribute($name);
114 $myAttr->value=$value;
116 }
117
118
120 {
121echo "-C";
122 return new php4DOMNode($this->myDOMNode->createCDATASection($content),$this);
123 }
124
125
127 {
128echo "-D";
130 }
131
132
134 {
135echo "-E";
136 return new php4DOMElement($this->myDOMNode->createElement($name),$this);
137 }
138
140 {
141echo "-F";
142 return new php4DOMNode($this->myDOMNode->createTextNode($content),$this);
143 }
144
146 {
147echo "-G";
148 return new php4DOMElement($this->myDOMNode->documentElement,$this);
149 }
150
152 {
153echo "-H";
154 return $this->myDOMNode->save(
$filename);
155 }
156
157 function dump_mem($format=
false,$encoding=
false)
158 {
159echo "-I";
160 return $this->myDOMNode->saveXML();
161 }
162
164 {
165echo "-J";
166 return new php4DOMElement($this->myDOMNode->getElementById($id),$this);
167 }
168
170 {
171echo "-K";
172 $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
173 $nodeSet=array();
174 $i=0;
175 if (isset($myDOMNodeList))
176 while ($node=$myDOMNodeList->item($i))
177 {
179 $i++;
180 }
181 return $nodeSet;
182 }
183
185 {
186echo "-L";
187 return $this->myDOMNode->saveHTML();
188 }
189
191 {
192echo "-M";
193 return new php4DOMElement($this->myDOMNode->documentElement,$this);
194 }
195}
196
198{
200 {
201echo "-N";
202 return $this->myDOMNode->getAttribute($name);
203 }
204
206 {
207echo "-O";
208 $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
209 $nodeSet=array();
210 $i=0;
211 if (isset($myDOMNodeList))
212 while ($node=$myDOMNodeList->item($i))
213 {
215 $i++;
216 }
217 return $nodeSet;
218 }
219
221 {
222echo "-P";
223 return $this->myDOMNode->hasAttribute($name);
224 }
225
227 {
228echo "-Q";
229 return $this->myDOMNode->removeAttribute($name);
230 }
231
233 {
234echo "-R";
235 return $this->myDOMNode->setAttribute($name,$value);
236 }
237
239 {
240echo "-S";
241 return $this->myDOMNode->tagName;
242 }
243}
244
246{
249
251 {
252echo "-T";
253 $this->myDOMNode=$aDomNode;
254 $this->myOwnerDocument=$aOwnerDocument;
255 }
256
257 function __get($name)
258 {
259echo "-U";
260 if ($name=='type') return $this->myDOMNode->nodeType;
261 elseif ($name=='tagname') return $this->myDOMNode->tagName;
262 elseif ($name=='content') return $this->myDOMNode->textContent;
264 {
265 $myErrors=debug_backtrace();
266 trigger_error('Undefined property: '.get_class($this).'::$'.$name.' ['.$myErrors[0]['file'].':'.$myErrors[0]['line'].']',E_USER_NOTICE);
267 return false;
268 }
269 }
270
272 {
273echo "-V";
274 return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);
275 }
276
278 {
279echo "-W";
280 return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode),$this->myOwnerDocument);
281 }
282
284 {
285echo "-X";
286 $myDOMNodeList=$this->myDOMNode->attributes;
287 $nodeSet=array();
288 $i=0;
289 if (isset($myDOMNodeList))
290 while ($node=$myDOMNodeList->item($i))
291 {
292 $nodeSet[]=
new php4DOMAttr($node,$this->myOwnerDocument);
293 $i++;
294 }
295 return $nodeSet;
296 }
297
299 {
300echo "-Y";
301 $myDOMNodeList=$this->myDOMNode->childNodes;
302 $nodeSet=array();
303 $i=0;
304 if (isset($myDOMNodeList))
305 while ($node=$myDOMNodeList->item($i))
306 {
308 $i++;
309 }
310 return $nodeSet;
311 }
312
314echo "-Z";
316 }
317
319echo "-a";
320 return new php4DOMElement($this->myDOMNode->cloneNode($deep),$this->myOwnerDocument);
321 }
322
324echo "-b";
325 return new php4DOMElement($this->myDOMNode->firstChild,$this->myOwnerDocument);
326 }
328echo "-c";
329 return $this->myDOMNode->textContent;
330 }
331
333echo "-d";
334 return $this->myDOMNode->hasAttributes();
335 }
337 {
338echo "-e";
339 return $this->myDOMNode->hasChildNodes();
340 }
342 {
343echo "-f";
344 return new php4DOMElement($this->myDOMNode->insertBefore($newnode->myDOMNode,$refnode->myDOMNode),$this->myOwnerDocument);
345 }
346
348 {
349echo "-g";
350 $myDOMNodeList=$this->myDOMNode->childNodes;
351 $i=0;
352 if (isset($myDOMNodeList))
353 while ($node=$myDOMNodeList->item($i))
354 {
355 if (($node->nodeType==XML_ELEMENT_NODE)||
356 (($node->nodeType==XML_TEXT_NODE)&&!ereg('^([[:cntrl:]]|[[:space:]])*$',$node->nodeValue)))
357 return false;
358 $i++;
359 }
360 return true;
361 }
362
364echo "-h";
365 return new php4DOMElement($this->myDOMNode->lastChild,$this->myOwnerDocument);
366 }
367
369 {
370echo "-i";
371 $mySubNode=$this->myDOMNode->ownerDocument->createElement($name);
372 $mySubNode->appendChild($this->myDOMNode->ownerDocument->createTextNode($content));
373 $this->myDOMNode->appendChild($mySubNode);
375 }
376
378echo "-j";
379 return new php4DOMElement($this->myDOMNode->nextSibling,$this->myOwnerDocument);
380 }
381
383echo "-k";
384 return $this->myDOMNode->localName;
385 }
386
388echo "-l";
389 return $this->myDOMNode->nodeType;
390 }
391
393 {
394echo "-m";
395 return $this->myDOMNode->nodeValue;
396 }
397
399 {
400echo "-n";
402 }
403
405echo "-o";
406 return new php4DOMElement($this->myDOMNode->parentNode,$this->myOwnerDocument);
407 }
408
410echo "-p";
411 return $this->myDOMNode->prefix;
412 }
413
415echo "-q";
416 return new php4DOMElement($this->myDOMNode->previousSibling,$this->myOwnerDocument);
417 }
418
420 {
421echo "-r";
422 return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode),$this->myOwnerDocument);
423 }
424
426echo "-s";
427 return new php4DOMElement($this->myDOMNode->replaceChild($oldnode->myDOMNode,$newnode->myDOMNode),$this->myOwnerDocument);
428 }
429
431 {
432echo "-t";
433 if (($this->myDOMNode->hasChildNodes())&&($this->myDOMNode->firstChild->nodeType==XML_TEXT_NODE))
434 $this->myDOMNode->removeChild($this->myDOMNode->firstChild);
435 return $this->myDOMNode->appendChild($this->myDOMNode->ownerDocument->createTextNode(
$text));
436 }
437}
438
440{
443
445 {
446echo "-u";
447 $this->myDOMNodelist=$aDOMNodelist;
448 $this->nodeset=array();
449 $i=0;
450 if (isset($this->myDOMNodelist))
451 while ($node=$this->myDOMNodelist->item($i))
452 {
454 $i++;
455 }
456 }
457}
458
460{
464 {
465echo "-v";
466 $this->myOwnerDocument=$dom_document;
467 $this->myDOMXPath=new DOMXPath($dom_document->myDOMNode);
468 }
469
470 function query($eval_str,$contextnode)
471 {
472echo "-w";
473 if (isset($contextnode))
return new php4DOMNodelist($this->myDOMXPath->query($eval_str,$contextnode->myDOMNode),$this->myOwnerDocument);
474 else return new php4DOMNodelist($this->myDOMXPath->query($eval_str),$this->myOwnerDocument);
475 }
476
478 {
479echo "-x";
480 return $this->myDOMXPath->registerNamespace($prefix,$namespaceURI);
481 }
482}
483
484if (extension_loaded('xsl'))
485{
486
487 function domxml_xslt_stylesheet($xslstring)
488 {
489echo "-y";
490 return new php4DomXsltStylesheet(DOMDocument::loadXML($xslstring));
491 }
492
493 function domxml_xslt_stylesheet_doc($dom_document) {
494echo "-z";
495 return new php4DomXsltStylesheet($dom_document);
496 }
497
498 function domxml_xslt_stylesheet_file($xslfile) {
499echo "-Ä";
500 return new php4DomXsltStylesheet(DOMDocument::load($xslfile));
501 }
502
503 class php4DomXsltStylesheet
504 {
505 var $myxsltProcessor;
506 function php4DomXsltStylesheet($dom_document)
507 {
508echo "-Ö";
509 $this->myxsltProcessor=new xsltProcessor();
510 $this->myxsltProcessor->importStyleSheet($dom_document);
511 }
512
513 function process($dom_document,$xslt_parameters=array(),$param_is_xpath=false)
514 {
515echo "-Ü";
516 foreach ($xslt_parameters as $param=>$value)
517 $this->myxsltProcessor->setParameter('',$param,$value);
519 $myphp4DOMDocument->myDOMNode=$this->myxsltProcessor->transformToDoc($dom_document->myDOMNode);
520 return $myphp4DOMDocument;
521 }
522
523 function result_dump_file($dom_document,
$filename)
524 {
525echo "-ä";
526 $html=$dom_document->myDOMNode->saveHTML();
529 }
530
531 function result_dump_mem($dom_document) {
532echo "-ö";
533 return $dom_document->myDOMNode->saveHTML();
534 }
535 }
536}
create_cdata_section($content)
get_elements_by_tagname($name)
dump_mem($format=false, $encoding=false)
create_text_node($content)
create_attribute($name, $value)
dump_file($filename, $compressionmode=false, $format=false)
php4DOMDocument($source, $file=true)
get_elements_by_tagname($name)
set_attribute($name, $value)
new_child($name, $content)
replace_child($oldnode, $newnode)
insert_before($newnode, $refnode)
php4DOMNodelist($aDOMNodelist)
php4DOMXPath($dom_document)
xpath_register_ns($prefix, $namespaceURI)