public static void Serialize(KSoft.IO.XmlElementStream s, FA mode, BXmlSerializerInterface xsi,
                                     IBListAutoIdXmlSerializer xs, bool forceNoRootElementStreaming = false)
        {
            Contract.Requires(s != null);
            Contract.Requires(xsi != null);
            Contract.Requires(xs != null);
            Contract.Requires(!xs.IsDisposed);

            if (forceNoRootElementStreaming)
            {
                xs.Params.SetForceNoRootElementStreaming(true);
            }
            xs.StreamXml(s, mode, xsi);
            if (forceNoRootElementStreaming)
            {
                xs.Params.SetForceNoRootElementStreaming(false);
            }
        }