Liquid XML Data Binder
Liquid XML Data Binder (C++, Java, VB6) / Reference / C++ / Reference / CXmlObjectBase / C++ ToFastInfosetStream - CXmlObjectBase
In This Topic
    C++ ToFastInfosetStream - CXmlObjectBase
    In This Topic
    CBinaryData ToFastInfosetStream(
                               FInfoDecl decl = FInfoDecl_NONE,
                               const CSerializationContext& context = CSerializationContext::GetDefaultContext(),
                               CompressionType compressionType = CompressionType_NONE) const
      Property Description  
        Method Name ToFastInfosetStream  
        Return The XML data contained in the object as a Fast Infoset.  
        Argument - decl Indicates the type of Fast Infoset Header to use. Defaults to NONE.  
        Argument - context

    The CSerializationContext object controls the way in which XML is serialized/de-serialized. Its main role is to control the way in which validation is performed and which namespaces are output.
    If this is not specified, the a default (CSerializationContext::Default global static) instance of the class is used. If you are using several libraries generated from different schemas, or you want to change the way validation is performed for during the lifetime of the application or you are writing multithreaded code, then you should consider creating your own instance(s) of the CSerializationContext.

    The GetFIContext() method provides a FastInfosetContext structure which controls the way in which XML is serialized and de-serialized as a Fast Infoset document. It allows aspects of the Fast Infoset encoding to be changed for each Xml Data Type.

    Note: If you are writing a multithreaded app it is highly recommended that you use a different instance of this class on each thread, as access to the static instance is not synchronized. Although read only operations to the static instance (CSerializationContext::Default) of the class are thread safe, if the global instance CSerializationContext::Default is modified, then this could potentially cause threading problems.

        Argument - compressionType Indicates the type of compression to apply to the output file, NONE, GZIP, or ZLIB. Defaults to NONE.  
        Description returns a CBinaryData object containing a stream of bytes representing the XML in its given encoding.  

    It will raise an exception if the XML within the object is not valid, i.e. an invalid number of entries in a collection.
    If the first overload is used then the XML will contain a document header, be formatted with indenting, and use CR's.

    See Multi-Language Support and Global Functions for more information.