Given an elementName, this function will remove the corresponding
XMLElement from the `$this->_head`

@param string $elementName
491371
public function removeFromHead($elementName)
    {
        foreach ($this->_head as $position => $element) {
            if ($element->getName() !== $elementName) {
                continue;
            }

            $this->removeFromHeadByPosition($position);
        }
    }
685891
public function removeChild( AbstractElement $element ) {
		$index = $this->indexOf($element);
		if( $index !== null ) {
			unset($this->childElements[$index]);

			//Remove any gaps
			$this->childElements = array_values($this->childElements);

			return true;
		}

		return false;
	}
100488
public function remove($fieldName): void
    {
        if (isset($this->mappedByStorageName[$fieldName])) {
            unset($this->mappedByStorageName[$fieldName]);
        }

        parent::remove($fieldName);
    }
287879
public function remove($element)
    {
        $hash = $this->hash($element);
        if (isset($this->hashTable[$hash])) {
            $i = array_search($element, $this->hashTable[$hash], true);
            if ($i !== false) {
                unset($this->hashTable[$hash][$i]);
                return true;
            }
        }
        return false;
    }
1104164
function setElementStyle($elementName, $styleName = null)
    {
        if (is_array($elementName)) {
            $this->_elementStyles = array_merge($this->_elementStyles, $elementName);
        } else {
            $this->_elementStyles[$elementName] = $styleName;
        }
    }
40579
public function remove($fieldName)
    {
        $key = array_search($fieldName, $this->fieldList);

        if ($key !== false) {
            unset($this->fieldList[$key]);
        }
    }
527053
public function removeAllListeners(string $eventName = null)
    {
        if (!\is_null($eventName)) {
            unset($this->listeners[$eventName]);
        } else {
            $this->listeners = [];
        }
    }
1049900
public void clearNamespaces( String elementName ) {
      if( StringUtils.isBlank( elementName ) ){
         rootNamespace.clear();
      }else{
         namespacesPerElement.remove( elementName );
      }
   }
478429
public function setElementInsteadOf($targetName, $element, $name = null) {
		if (! isset($this->_elements[$targetName])) {
			return $this;
		}
		
		$elements = [];
		
		foreach ($this->_elements as $existsName => $existsElement) {
			
			if ($targetName === $existsName) {
				if ($name === null) {
					$elements[] = $element;
				} else {
					$elements[$name] = $element;
				}
			} else {
				$elements[$existsName] = $existsElement;
			}
		}
		
		$this->_elements = $elements;
		
		return $this;
	}
169298
public function handleDelete(string $fileName): void
	{
		if ($this->presenter->isAjax() && $this->editable) {
			$file = $this->getFileInfo($fileName);
			if ($file->isDir) {
				File::removeDir($this->getFullPath($file->name));
			} else {
				unlink($this->getFullPath($file->name));
			}
			$this->redrawControl('fileManagerContainer');
		} else {
			exit;
		}
	}
1342497
public function removeElement($name)
    {
        $returnValue = false;

		foreach($this->elements as $index => $element){
			if($element->getName() == $name){
				unset($this->elements[$index]);
				$groupName = $this->getElementGroup($name);
				if(!empty($groupName)){
					if(isset($this->groups[$groupName]['elements'][$name])){
						unset($this->groups[$groupName]['elements'][$name]);
					}
				}
				$returnValue = true;
			}
		}

        return $returnValue;
    }
518573
public function remove($name)
    {
        $this->requireNames();
        
        $lower = strtolower($name);
        if(array_key_exists($lower, $this->names)) {
            $name = $this->names[$lower];
            unset($this->names[$lower]);
            unset($this->headers[$name]);
        }
    }
143822
public function aliasElement($elName, $tagName)
	{
		$elName = $this->normalizeElementName($elName);

		$this->aliases[$elName][''] = TagName::normalize($tagName);
	}
991159
public function remove($element) : void
    {
        $key = array_search($element, $this->elements);
        if ($key === false) {
            return;
        }
        unset($this->elements[$key]);
    }
92877
protected function cleanAttributesOnWhitelist(\DOMElement $element)
    {
        for ($x = $element->attributes->length - 1; $x >= 0; $x--) {
            // get attribute name
            $attrName = $element->attributes->item($x)->name;

            // Remove attribute if not in whitelist
            if (!in_array(strtolower($attrName), $this->allowedAttrs) && !$this->isAriaAttribute(strtolower($attrName)) && !$this->isDataAttribute(strtolower($attrName))) {

                $element->removeAttribute($attrName);
                $this->xmlIssues[] = array(
                    'message' => 'Suspicious attribute \'' . $attrName . '\'',
                    'line' => $element->getLineNo(),
		);
            }

            // Do we want to strip remote references?
            if($this->removeRemoteReferences) {
                // Remove attribute if it has a remote reference
                if (isset($element->attributes->item($x)->value) && $this->hasRemoteReference($element->attributes->item($x)->value)) {
                    $element->removeAttribute($attrName);
                    $this->xmlIssues[] = array(
                        'message' => 'Suspicious attribute \'' . $attrName . '\'',
                        'line' => $element->getLineNo(),
		    );
                }
            }
        }
    }
38629
public function deleteElement($indexOrNameOrInstance)
    {
        if ($indexOrNameOrInstance instanceof ElementInformationInterface) {
            \array_filter(
                $this->elements,
                function ($element) use ($indexOrNameOrInstance) {
                    /** @var ElementInformationInterface $element */

                    return $element === $indexOrNameOrInstance;
                }
            );
        } elseif (\is_string($indexOrNameOrInstance)) {
            foreach ($this as $index => $element) {
                /** @var ElementInformationInterface $element */
                if ($indexOrNameOrInstance === $element->getName()) {
                    unset($this->elements[$index]);
                    break;
                }
            }
        } elseif (\is_numeric($indexOrNameOrInstance)) {
            unset($this->elements[$indexOrNameOrInstance]);
        }

        return $this;
    }
291578
public static function removeTagName(\DOMDocument $domdocument, $tagname)
    {
        $nodeLista = $domdocument->getElementsByTagName($tagname);
        if ($nodeLista->length > 0) {
            $node = $nodeLista->item(0);
            XmlUtil::removeNode($node);
            return true;
        } else {
            return false;
        }
    }