src/XmlUtil.php
public static function createChildBefore(\DOMNode $rootNode, $nodeName, $nodeText, $position = 0)
    {
        return self::createChildBeforeNode($nodeName, $nodeText, $rootNode->childNodes->item($position));
    }
public static function createChildBefore(\DOMNode $rootNode, $nodeName, $nodeText, $position = 0)
    {
        return self::createChildBeforeNode($nodeName, $nodeText, $rootNode->childNodes->item($position));
    }
public static function createChildBefore ( \ DOMNode $ rootNode , $ nodeName , $ nodeText , $ position = 0 ) { return self :: createChildBeforeNode ( $ nodeName , $ nodeText , $ rootNode -> childNodes -> item ( $ position ) ) ; }
Create child node on the top from specific node and add text

@param \DOMNode $rootNode Parent node
@param string $nodeName Node to add string
@param string $nodeText Text to add string
@param int $position
@return DOMNode
@throws \ByJG\Util\Exception\XmlUtilException
Create child node on the top from specific node and add text