public static function serialize($object)
    {
        Validate::notNull($object, 'object');

        $xmlWriter = new \XMLWriter();
        $xmlWriter->openMemory();

        $xmlWriter->startElementNS(
            'meta',
            Resources::PROPERTIES,
            Resources::DSM_XML_NAMESPACE
        );
        self::_serializeRecursive($object, $xmlWriter);
        $xmlWriter->endElement();

        return $xmlWriter->outputMemory();
    }