39 return $xpath_context->query($eval_str);
53 $this->myDOMAttr=$aDOMAttr;
58 return $this->myDOMAttr->name;
63 return $this->myDOMAttr->specified;
68 return $this->myDOMAttr->value;
74 var $myDOMCDATASection;
78 parent::php4DOMNode($aDOMCDATASection);
79 $this->myDOMCDATASection=$aDOMCDATASection;
93 $this->myDOMDocument->load($source);
97 $this->myDOMDocument->loadXML($source);
108 unset($this->myDOMDocument);
120 $str = $this->myDOMDocument->saveXML($node->myDOMNode);
127 $ok = $this->myDOMDocument->validate();
137 $myAttr=$this->myDOMDocument->createAttribute($name);
138 $myAttr->value=$value;
155 return new php4DOMElement($this->myDOMDocument->createElement($name));
160 return new php4DOMNode($this->myDOMDocument->createTextNode($content));
170 return $this->myDOMDocument->save(
$filename);
175 return $this->myDOMDocument->saveXML();
180 $myDOMNodeList=$this->myDOMDocument->getElementsByTagName($name);
183 while ($node=$myDOMNodeList->item($i))
194 return $this->myDOMDocument->saveHTML();
206 return $this->myDOMNode->getAttribute($name);
211 $myDOMNodeList=$this->myDOMNode->getElementsByTagName($name);
214 while ($node=$myDOMNodeList->item($i))
225 return $this->myDOMNode->hasAttribute($name);
230 return $this->myDOMNode->removeAttribute($name);
235 return $this->myDOMNode->setAttribute($name,$value);
240 return $this->myDOMNode->tagName;
253 $text_node =
new DOMText();
254 $text_node->appendData(
$text);
255 if (is_object($this->myDOMNode->firstChild))
257 $this->myDOMNode->replaceChild($text_node, $this->myDOMNode->firstChild);
261 $this->myDOMNode->appendChild($text_node);
268 $text_node =& $this->myDOMNode->firstChild;
270 if (is_object($text_node))
272 return $text_node->textContent;
283 parent::unlink_node($aDomNode);
297 $this->myDOMNode=$aDomNode;
305 $doc =& $this->myDOMNode->ownerDocument;
307 $newnode->myDOMNode =& $doc->importNode($newnode->myDOMNode,
true);
309 return new php4DOMElement($this->myDOMNode->appendChild($newnode->myDOMNode));
318 return $this->
set_content($newnode->myDOMNode->textContent);
323 return new php4DOMElement($this->myDOMNode->parentNode->appendChild($newnode->myDOMNode));
329 $myDOMNodeList=$this->myDOMNode->attributes;
332 if (is_object($myDOMNodeList))
334 while ($node=$myDOMNodeList->item($i))
346 $myDOMNodeList=$this->myDOMNode->childNodes;
349 while ($node=$myDOMNodeList->item($i))
368 if (!is_object($aDomNode))
373 $parent =& $aDomNode->myDOMNode->parentNode;
374 if (is_object($parent))
376 $parent->removeChild($aDomNode->myDOMNode);
392 return $this->myDOMNode->textContent;
397 return $this->myDOMNode->hasAttributes();
402 return $this->myDOMNode->hasChildNodes();
409 $doc =& $this->myDOMNode->ownerDocument;
410 $newnode->myDOMNode =& $doc->importNode($newnode->myDOMNode,
true);
413 $mynewnode =& $newnode->myDOMNode;
414 $myrefnode =& $refnode->myDOMNode;
417 $domel =& $mydomnode->insertBefore($mynewnode,$myrefnode);
419 catch (DOMException $exception)
422 $mydomnode =& $this->myDOMNode->parentNode;
423 $domel =& $mydomnode->insertBefore($mynewnode,$myrefnode);
432 $last =& $this->myDOMNode->lastChild;
434 if (is_object($last))
447 $next =& $this->myDOMNode->nextSibling;
449 if (is_object($next))
461 return $this->myDOMNode->nodeName;
466 return $this->myDOMNode->nodeType;
471 return $this->myDOMNode->nodeValue;
477 $parent =& $this->myDOMNode->parentNode;
479 if (is_object($parent))
492 $prev =& $this->myDOMNode->previousSibling;
494 if (is_object($prev))
506 return new php4DOMElement($this->myDOMNode->removeChild($oldchild->myDOMNode));
511 return new php4DOMElement($this->myDOMNode->replaceChild($oldchild->myDOMNode,$newnode->myDOMNode));
516 $this->myDOMNode->textContent =
$text;
517 return $this->myDOMNode->textContent;
528 $this->myDOMNodelist=$aDOMNodelist;
529 $this->nodeset=
array();
531 while ($node=$this->myDOMNodelist->item($i))
551 $this->myDOMXPath=
new DOMXPath($dom_document->myDOMDocument);
561 return $this->myDOMXPath->registerNamespace($prefix,$namespaceURI);
xpath_register_ns($prefix, $namespaceURI)
set_attribute($name, $value)
xpath_new_context($dom_document)
php4DOMDocument($source, $file=true)
xpath_eval($xpath_context, $eval_str, $contextnode=null)
dump_mem($format=false, $encoding=false)
dump_file($filename, $compressionmode=false, $format=false)
get_elements_by_tagname($name)
create_cdata_section($content)
get_elements_by_tagname($name)
insert_before($newnode, $refnode)
php4DOMNodelist($aDOMNodelist)
unlink_node($aDomNode="")
Create styles array
The data for the language used.
create_attribute($name, $value)
php4DOMXPath($dom_document)
create_text_node($content)
domxml_open_mem($str, $mode=0, &$error=NULL)
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
replace_child($oldnode, $newnode)
domxml_open_file($filename)
php4DOMCDATASection($aDOMCDATASection)