extension/ezjscore/classes/ezjscajaxcontent.php
public static function xmlEncode( $hash, $childName = 'child' )
    {
        $xml = new XmlWriter();
        $xml->openMemory();
        $xml->startDocument('1.0', 'UTF-8');
        $xml->startElement('root');

        self::xmlWrite( $xml, $hash, $childName );

        $xml->endElement();
        return $xml->outputMemory( true );

    }
public static function xmlEncode( $hash, $childName = 'child' )
    {
        $xml = new XmlWriter();
        $xml->openMemory();
        $xml->startDocument('1.0', 'UTF-8');
        $xml->startElement('root');

        self::xmlWrite( $xml, $hash, $childName );

        $xml->endElement();
        return $xml->outputMemory( true );

    }
public static function xmlEncode ( $ hash , $ childName = 'child' ) { $ xml = new XmlWriter ( ) ; $ xml -> openMemory ( ) ; $ xml -> startDocument ( '1.0' , 'UTF-8' ) ; $ xml -> startElement ( 'root' ) ; self :: xmlWrite ( $ xml , $ hash , $ childName ) ; $ xml -> endElement ( ) ; return $ xml -> outputMemory ( true ) ; }
Encodes simple multilevel array and hash values to valid xml string

@param mixed $hash
@param string $childName
@return string
Encodes simple multilevel array and hash values to valid xml string