src/XmlUtil.php
public static function createChild(\DOMNode $rootNode, $nodeName, $nodeText = "", $uri = "")
    {
        if (empty($nodeName)) {
            throw new XmlUtilException("Node name must be a string.");
        }

        $nodeworking = XmlUtil::createChildNode($rootNode, $nodeName, $uri);
        self::addTextNode($nodeworking, $nodeText);
        $rootNode->appendChild($nodeworking);
        return $nodeworking;
    }
public static function createChild(\DOMNode $rootNode, $nodeName, $nodeText = "", $uri = "")
    {
        if (empty($nodeName)) {
            throw new XmlUtilException("Node name must be a string.");
        }

        $nodeworking = XmlUtil::createChildNode($rootNode, $nodeName, $uri);
        self::addTextNode($nodeworking, $nodeText);
        $rootNode->appendChild($nodeworking);
        return $nodeworking;
    }
public static function createChild ( \ DOMNode $ rootNode , $ nodeName , $ nodeText = "" , $ uri = "" ) { if ( empty ( $ nodeName ) ) { throw new XmlUtilException ( "Node name must be a string." ) ; } $ nodeworking = XmlUtil :: createChildNode ( $ rootNode , $ nodeName , $ uri ) ; self :: addTextNode ( $ nodeworking , $ nodeText ) ; $ rootNode -> appendChild ( $ nodeworking ) ; return $ nodeworking ; }
Append child node 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 string $uri
@return DOMNode
@throws \ByJG\Util\Exception\XmlUtilException
Append child node from specific node and add text