@param DOMElement $node

@return Item
174311
public function create(DOMElement $node)
    {
        $item = new Item();
        $this->setProperties($node, $item);
        $this->setDate($node, $item);
        $this->setTags($node, $item);
        $this->executeAggregators($node, $item);

        return $item;
    }
1145630
public function retriveAttributeType(\DOMElement $element)
    {
        $name = $this->engine->query($element->getNodePath() . '/dia:attribute[@name="type"]/dia:string');
        return $this->cleanString($name->item(0)->nodeValue);
    }
744070
public static function createFromXML( DOMElement $node )
    {
        $newObj = new eZPageZone();

        if ( $node->hasAttributes() )
        {
            foreach ( $node->attributes as $attr )
            {
                if ( $attr->name == 'id' )
                {
                    $value = explode( '_', $attr->value );
                    $newObj->setAttribute( $attr->name, $value[1] );
                }
                else
                {
                    $newObj->setAttribute( $attr->name, $attr->value );
                }
            }
        }

        foreach ( $node->childNodes as $node )
        {
            if ( $node->nodeType == XML_ELEMENT_NODE && $node->nodeName == 'block' )
            {
                $blockNode = eZPageBlock::createFromXML( $node );
                $newObj->addBlock( $blockNode );
            }
            elseif ( $node->nodeType == XML_ELEMENT_NODE )
            {
                $newObj->setAttribute( $node->nodeName, $node->nodeValue );
            }
        }

        return $newObj;
    }
1018402
private static function _nodeToValue($node)
    {
        $type = null;
        if ($node instanceof DOMElement) {
            $type = $node->getAttribute('type');
        }

        switch($type) {
        case 'datetime':
            return self::_timestampToUTC((string) $node->nodeValue);
        case 'date':
            return new DateTime((string) $node->nodeValue);
        case 'integer':
            return (int) $node->nodeValue;
        case 'boolean':
            $value =  (string) $node->nodeValue;
            if(is_numeric($value)) {
                return (bool) $value;
            } else {
                return ($value !== "true") ? false : true;
            }
        case 'array':
        case 'collection':
            return self::_nodeToArray($node);
        default:
            if ($node->hasChildNodes()) {
                return self::_nodeToArray($node);
            } elseif (trim($node->nodeValue) === '') {
                return null;
            } else {
                return $node->nodeValue;
            }
        }
    }
72798
protected function arrayToDomNode(\DOMDocument $dom, \DOMElement $node, array $arr)
    {
        foreach ($arr as $key => $item) {
            $ref = null;
            if (is_numeric($key) || empty($key)) {
                if (is_numeric($key)) {
                    $ref = $key;
                }
                $key = 'item';
            }
            if (is_array($item)) {
                $newNode = $dom->createElement($key);
                if (!is_null($ref)) {
                    $attr = $dom->createAttribute('ref');
                    $attr->value = $ref;
                    $newNode->appendChild($attr);
                }
                $this->arrayToDomNode($dom, $newNode, $item);
                $node->appendChild($newNode);
            } elseif (is_object($item)) {
                $this->encodeObject($key, $item, $dom, $node);
            } else {
                $node->appendChild($dom->createElement($key, $item));
            }
        }
    }
1336487
public function append($node)
    {
        $current = $this->getCurrentNode();

        $current
            ? $current->appendChild($node)
            : $this->setCurrentNode($node);

        return $this;
    }
607319
public function setDOMElementPayload(DOMElement $element)
    {
        $this->setPayload($element->ownerDocument->saveXML($element));

        return $this;
    }
612458
protected function setNode($node)
    {
        $allowedClasses = ['DOMElement', 'DOMText', 'DOMComment', 'DOMCdataSection'];

        if (!is_object($node) || !in_array(get_class($node), $allowedClasses, true)) {
            throw new InvalidArgumentException(sprintf('Argument 1 passed to %s must be an instance of DOMElement, DOMText, DOMComment or DOMCdataSection, %s given', __METHOD__, (is_object($node) ? get_class($node) : gettype($node))));
        }

        $this->node = $node;

        return $this;
    }
290334
public function parseElement(Node $parent, \DOMElement $element)
    {
        if (Atom::NS !== $element->namespaceURI) {
            return null;
        }

        $name = 'atom:' . $element->localName;
        if (array_key_exists($name, $this->elementMap)) {
            $class = $this->elementMap[$name];

            return new $class($parent, $element);
        }

        return null;
    }
678068
public function process(DOMElement $node, Item $item)
    {
        foreach ($this->keys as $key) {
            $item->setExtra($key, $this->getValue($node, $key));
        }
    }
151682
public function then($node)
    {
        $this->_map = $this->prepare()->first(false);

        $this->from($node);

        return $this;
    }
1187630
private function visitNode(\DOMNode $node)
    {
        if ($this->node !== $node) {
            $this->node->appendChild($node);
        }

        return $node;
    }
564920
public static function getText(DOMElement $node)
    {
        $s = '';
        for ($i = 0; $i < $node->childNodes->length; $i++) {
            $child = $node->childNodes->item($i);

            switch ($child->nodeType) {
                case XML_CDATA_SECTION_NODE:
                case XML_TEXT_NODE: {
                    $s .= $child->nodeValue;
                }
            }
        }

        return $s;
    }
708071
protected function registerNode(\DOMNode $node)
    {
        if ($node->nodeType == XML_ELEMENT_NODE) {
            /** @var \DOMElement $node */
            $localContext = $this->elementProcessor->processElement($node, $this->initialContext);

            // Register the node context
            $localContextId = spl_object_hash($localContext);
            if (empty($this->contexts[$localContextId])) {
                $this->contexts[$localContextId] = $localContext;
            }

            $this->contextMap[$node->getNodePath()] = $localContextId;
        }

        return $node;
    }
464154
public function selectNode(string $node = Pool::MASTER): self
    {
        $this->node = $node;

        return $this;
    }
1013082
protected function fieldToElement(DOMDocument $doc, string $value): DOMElement
    {
        $item = $doc->createElement($this->field_name);
        $item->appendChild($doc->createTextNode($value));

        return $item;
    }
741227
protected function extendedNodeWysiwyg(DOMElement $node)
	{
		$parent = $node->parentNode;
		//$id = $node->getAttribute('id');

		/* Создаём замену для тега wysiwyg */
		$textarea = $this->xml->createElement('textarea');
		$this->copyElement($node, $textarea);

		//$tabDiv->setAttribute('id', $id);
		$textarea->setAttribute('class', 'wysiwyg');
		$parent->replaceChild($textarea, $node);

		// инициализация вкладок, проводится перед обработкой ошибок
		//array_unshift($this->js, 'initTabWidget("'.$node->getAttribute('id').'")');

		return $textarea;
	}