Add metadata node to the manifest.

@return \SimpleXMLElement
329116
protected function addMetadata()
    {
        $metadata = $this->xml->addChild('metadata');
        $metadata->addChild('schema', 'ADL SCORM');
        $metadata->addChild('schemaversion', $this->getSchemaVersion());

        return $metadata;
    }
296762
protected function addMigrationsNode()
    {
        $builder = new TreeBuilder();
        $node = $builder->root('migrations');

        $node->isRequired()
            ->children()
                ->scalarNode('directory')->defaultValue('migrations')->end()
                ->scalarNode('namespace')->defaultValue('Migrations')->end()
            ->end()
        ->end();

        return $node;
    }
55848
public function addGraphMetadata(GraphNode $node, GraphMetadataInterface $data)
    {
        $this->nodes[] = [
            'node'   => $node,
            'object' => $data,
        ];

        return $this;
    }
1092571
private function buildNodeMetadata(\SimpleXMLElement $node, $className)
    {
        if (!isset($node['label'])) {
            throw new MappingException(
                sprintf('Class "%s" OGM XML node configuration is missing "label" attribute', $className)
            );
        }

        return new NodeAnnotationMetadata(
            (string) $node['label'],
            isset($node['repository-class']) ? (string) $node['repository-class'] : null
        );
    }
850230
protected function create_metadata_resource(cc_i_metadata_resource $met, DOMDocument &$doc, $xmlnode = null) {

        $dnode = $doc->createElementNS($this->ccnamespaces['lom'], "lom");

        !empty($xmlnode) ? $xmlnode->appendChild($dnode) : null;
        !empty($met->arrayeducational) ? $this->create_metadata_educational($met, $doc, $dnode) : null;

        return $dnode;
    }
1204822
protected static function addNode(\SimpleXMLElement $source, \SimpleXMLElement $new)
	{
		// Add the new child node.
		$node = $source->addChild($new->getName(), trim($new));

		// Add the attributes of the child node.
		foreach ($new->attributes() as $name => $value)
		{
			$node->addAttribute($name, $value);
		}

		// Add any children of the new node.
		foreach ($new->children() as $child)
		{
			self::addNode($node, $child);
		}
	}
133262
private function addRiakNode()
    {
        $builder = new TreeBuilder('riak');
        $node    = $this->getRootNode($builder, 'riak');

        $node
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('host')->defaultValue('%doctrine_cache.riak.host%')->end()
                ->scalarNode('port')->defaultValue('%doctrine_cache.riak.port%')->end()
                ->scalarNode('bucket_name')->defaultValue('doctrine_cache')->end()
                ->scalarNode('connection_id')->defaultNull()->end()
                ->scalarNode('bucket_id')->defaultNull()->end()
                ->arrayNode('bucket_property_list')
                    ->children()
                        ->scalarNode('allow_multiple')->defaultNull()->end()
                        ->scalarNode('n_value')->defaultNull()->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $node;
    }
944027
public function xml()
    {
        foreach ($this->_result as $disk_items) {
            if (isset($disk_items['Name']) && (trim($disk_items['Name']) !== '')) {
                $xmlstablebit_disk = $this->xml->addChild("Disk");
                foreach ($this->stablebit_items as $item) {
                    if (isset($disk_items[$item]) && (($itemvalue=$disk_items[$item]) !== '') &&
                    (($item !== 'SerialNumber') || (defined('PSI_PLUGIN_STABLEBIT_SHOW_SERIAL') && (PSI_PLUGIN_STABLEBIT_SHOW_SERIAL === true)))) {
                        $xmlstablebit_disk ->addAttribute($item, $itemvalue);
                    }
                }
            }
        }

        return $this->xml->getSimpleXmlElement();
    }
364305
public function addMeta(\Sulu\Bundle\MediaBundle\Entity\FileVersionMeta $meta)
    {
        $this->meta[] = $meta;

        return $this;
    }
1110935
public function toXml(\SimpleXmlElement $root) {
    	$methodNode = $root->addChild("method");
    	$methodNode->addAttribute("name", $this->getName());
    	$modifier = "";
    	if ($this->isPublic()) {
    		$modifier = "public";
    	} elseif ($this->isProtected()) {
    		$modifier = "protected";
    	} elseif ($this->isPrivate()) {
    		$modifier = "private";
    	}
    	$methodNode->addAttribute("modifier", $modifier);
    	$methodNode->addAttribute("static", $this->isStatic()?"true":"false");
    	$methodNode->addAttribute("abstract", $this->isAbstract()?"true":"false");
    	$methodNode->addAttribute("constructor", $this->isConstructor()?"true":"false");
    	$methodNode->addAttribute("final", $this->isFinal()?"true":"false");
    	$commentNode = $methodNode->addChild("comment");
    	
    	$node= dom_import_simplexml($commentNode);
   		$no = $node->ownerDocument;
   		$node->appendChild($no->createCDATASection($this->getDocComment())); 
    	
    	
    	foreach ($this->getParameters() as $parameter) {
    		$parameter->toXml($methodNode);
    	}
    }
869884
public function putXML(){
		$xml = $this->getXML();
		return $this->distributor->write($xml, $this->proper_path);
	}
806525
protected function appendDescriptionNode()
    {
        if ($this->template) {
            $descriptionTag = $this->getTemplateRegistrationDescriptionTag();
        } else {
            $descriptionTag = $this->getRegistrationDescriptionTag();
        }

        $descriptionElement = $this->dom->createElement($descriptionTag);
        $descriptionElement->setAttribute('xmlns:i', 'http://www.w3.org/2001/XMLSchema-instance');
        $descriptionElement->setAttribute('xmlns', 'http://schemas.microsoft.com/netservices/2010/10/servicebus/connect');

        return $this->content->appendChild($descriptionElement);
    }
1065574
public function updateCachedMetadata()
    {
        $ed = $this->getEntitiesDescriptor();
        $ed = $this->exclude($ed);
        $ed = $this->filter($ed);
        $this->addSignature($ed);

        $xml = $ed->toXML();
        $xml = $xml->ownerDocument->saveXML($xml);

        if ($this->cacheGenerated !== null) {
            Logger::debug($this->logLoc.'Saving generated metadata to cache.');
            $this->addCacheItem($this->cacheId, $xml, time() + $this->cacheGenerated, $this->cacheTag);
        }

        return $xml;
    }
645026
private function addNamespaceAttributes(ClassMetadata $metadata, \DOMElement $element): void
    {
        foreach ($metadata->xmlNamespaces as $prefix => $uri) {
            $attribute = 'xmlns';
            if ('' !== $prefix) {
                $attribute .= ':' . $prefix;
            } elseif ($element->namespaceURI === $uri) {
                continue;
            }
            $element->setAttributeNS('http://www.w3.org/2000/xmlns/', $attribute, $uri);
        }
    }
128593
public function serializeToXml()
    {
        $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><RefererConfiguration></RefererConfiguration>');
        if ($this->allowEmptyReferer) {
            $xml->addChild('AllowEmptyReferer', 'true');
        } else {
            $xml->addChild('AllowEmptyReferer', 'false');
        }
        $refererList = $xml->addChild('RefererList');
        foreach ($this->refererList as $referer) {
            $refererList->addChild('Referer', $referer);
        }
        return $xml->asXML();
    }
333179
public function put_nodes() {

        $resnodestr = "//imscc:manifest[@identifier='".$this->activemanifest->manifestID().
            "']/imscc:resources";
        $resnode    = $this->node($resnodestr);

        foreach ($this->activemanifest->resources as $k => $v) {
            ($k);
            $depen = $this->check_if_exist_in_other($v->files[0], $v->identifier);
            if (!empty($depen)) {
                $this->replace_file_x_dependency($depen, $v->files[0]);
                $v->type = 'webcontent';
            }
        }

        foreach ($this->activemanifest->resources as $node) {
            $rnode = $this->activemanifest->create_resource_node($node, $this->doc, null);
            $resnode->appendChild($rnode);
            if ($node->instructoronly) {
                $metafileceduc = new cc_metadata_resouce_educational();
                $metafileceduc->set_value(intended_user_role::INSTRUCTOR);
                $metafile = new cc_metadata_resouce();
                $metafile->add_metadata_resource_educational($metafileceduc);
                $this->activemanifest->create_metadata_educational($metafile, $this->doc, $rnode);
            }
        }

        return $resnode;
    }
572907
public function xml()
    {
        foreach ($this->_result as $ps) {
            $xmlps = $this->xml->addChild("Process");
            $xmlps->addAttribute("Name", $ps[0]);
            $xmlps->addAttribute("Status", $ps[1] ? 1 : 0);
        }

        return $this->xml->getSimpleXmlElement();
    }