function createTag($qname, $attributes = array(), $content = null, 
        $namespaceUri = null, $replaceEntities = XML_UTIL_REPLACE_ENTITIES, 
        $multiline = false, $indent = '_auto', $linebreak = "\n", 
        $sortAttributes = true)
    {
        $tag = array(
            'qname'      => $qname,
            'attributes' => $attributes
        );

        // add tag content
        if ($content !== null) {
            $tag['content'] = $content;
        }

        // add namespace Uri
        if ($namespaceUri !== null) {
            $tag['namespaceUri'] = $namespaceUri;
        }

        return XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, 
            $indent, $linebreak, $sortAttributes);
    }