Lines Matching defs:domElement

23     private DOMElement $domElement;
28 * @param DOMElement $domElement - the dom element wrapped
31 public function __construct(DOMElement $domElement, XmlDocument $document)
33 $this->domElement = $domElement;
38 public static function create($domElement, XmlDocument $xmlDocument): XmlElement
40 return new XmlElement($domElement, $xmlDocument);
45 return $this->domElement->getAttribute($qualifiedName);
50 return $this->domElement->getAttribute("class");
58 $firstChild = $this->domElement->firstChild;
74 foreach ($this->domElement->childNodes as $childNode) {
88 foreach ($this->domElement->childNodes as $childNode) {
106 foreach ($this->document->xpath($xpath, $this->domElement) as $child) {
117 return $this->document->toXmlNormalized($this->domElement);
123 $attr = $this->domElement->getAttributeNode($attributeName);
127 $result = $this->domElement->removeAttributeNode($attr);
129 throw new ExceptionRuntime("Not able to delete the attribute $attributeName of the node element {$this->domElement->tagName} in the Xml document");
136 $this->domElement->parentNode->removeChild($this->domElement);
142 return $this->domElement->getAttribute("style");
147 return $this->domElement->nodeValue;
165 return $this->domElement->localName;
171 $this->domElement->setAttribute("class", $classes);
177 $this->domElement->setAttribute($name, $value);
183 return $this->domElement->hasAttribute($name);
188 return $this->domElement;
200 $textNode = $this->domElement->ownerDocument->createTextNode($string);
207 return $this->domElement->ownerDocument->saveHTML($this->domElement);
212 return $this->domElement->ownerDocument->saveXML($this->domElement);
255 $element = $this->importIfExternal($xmlElement->domElement);
256 $this->domElement->appendChild($element);
267 $this->domElement->nodeValue = $nodeValue;
285 * @param DOMElement $domElement
288 private function importIfExternal(DOMElement $domElement): DOMElement
290 if ($domElement->ownerDocument !== $this->getDocument()->getDomDocument()) {
291 return $this->getDocument()->getDomDocument()->importNode($domElement, true);
293 return $domElement;
303 $this->domElement,
304 $rightDocument->domElement,
326 $parentNode = $this->domElement->parentNode;
351 $this->domElement->appendChild($domNode);
354 $firstChild = $this->domElement->firstChild;
356 $this->domElement->appendChild($domNode);
366 $this->domElement->parentNode->insertBefore($domNode, $this->domElement);
378 return $this->domElement->nodeValue;