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;
79 $this->myDOMCDATASection=$aDOMCDATASection;
90 $this->myDOMDocument=
new DOMDocument();
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();
130 $error = array(array(
"0",
"Unknown Error"));
137 $myAttr=$this->myDOMDocument->createAttribute(
$name);
138 $myAttr->value=$value;
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;
249 $text = str_replace(
"<",
"<", $text);
250 $text = str_replace(
">",
">", $text);
251 $text = str_replace(
"&",
"&", $text);
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;
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);