protected function toXmlTag($tag, $attrs, $content = null)
    {
        $xml = "<$tag ";
        if ($attrs) {
            $attrStrs = array();
            foreach ($attrs as $attrName => $attrVal) {
                $attrStrs[] = "$attrName='$attrVal'";
            }
            $xml .= $attrStrs ? implode(' ', $attrStrs) : '';
        }
        $xml .= $content ? ">$content</$tag>" : '/>';
        return $xml;
    }
protected function toXmlTag($tag, $attrs, $content = null)
    {
        $xml = "<$tag ";
        if ($attrs) {
            $attrStrs = array();
            foreach ($attrs as $attrName => $attrVal) {
                $attrStrs[] = "$attrName='$attrVal'";
            }
            $xml .= $attrStrs ? implode(' ', $attrStrs) : '';
        }
        $xml .= $content ? ">$content</$tag>" : '/>';
        return $xml;
    }
protected function toXmlTag ( $ tag , $ attrs , $ content = null ) { $ xml = "<$tag " ; if ( $ attrs ) { $ attrStrs = array ( ) ; foreach ( $ attrs as $ attrName => $ attrVal ) { $ attrStrs [ ] = "$attrName='$attrVal'" ; } $ xml .= $ attrStrs ? implode ( ' ' , $ attrStrs ) : '' ; } $ xml .= $ content ? ">$content</$tag>" : '/>' ; return $ xml ; }
Convert definition to XML tag

@param string $tag
@param string $attrs Map of attributes
@param string $content Inner content
@return String XML tag
Convert definition to XML tag