LiquidTechnologies.XmlObjects Namespace / LxSerializer Class / SerializeSnippet Method
The System.Xml.XmlWriter to write the XML data to
The Liquid XML Objects attributed class to serialize
The name of the XML element that will be created. If the elementObj represents a root or inline xs:element this this IS NOT required (if it is specified, it must match the xs:element name). If the elementObj represents a xs:complexType then this IS required.
The default type of the element to be written, only used when elementObj represents a complexType. If elementObj represents a complexType, then the xsi:type attribute will be written if it elementObj is not of this type.
The Liquid XML Objects settings to control the serialization, default configuration is used if null

In This Topic
    SerializeSnippet Method
    In This Topic
    Serializes a Liquid XML Objects attributed class to an System.Xml.XmlWriter as a snippet.
    Syntax
    'Declaration
     
    
    Public Sub SerializeSnippet( _
       ByVal xmlWriter As System.Xml.XmlWriter, _
       ByVal elementObj As System.Object, _
       Optional ByVal elementName As System.Xml.XmlQualifiedName, _
       Optional ByVal elementType As System.Type, _
       Optional ByVal settings As LxWriterSettings _
    ) 
    public void SerializeSnippet( 
       System.Xml.XmlWriter xmlWriter,
       System.object elementObj,
       System.Xml.XmlQualifiedName elementName,
       System.Type elementType,
       LxWriterSettings settings
    )

    Parameters

    xmlWriter
    The System.Xml.XmlWriter to write the XML data to
    elementObj
    The Liquid XML Objects attributed class to serialize
    elementName
    The name of the XML element that will be created. If the elementObj represents a root or inline xs:element this this IS NOT required (if it is specified, it must match the xs:element name). If the elementObj represents a xs:complexType then this IS required.
    elementType
    The default type of the element to be written, only used when elementObj represents a complexType. If elementObj represents a complexType, then the xsi:type attribute will be written if it elementObj is not of this type.
    settings
    The Liquid XML Objects settings to control the serialization, default configuration is used if null
    Remarks
    The elementObj is written to the the xmlWriter without adding the document header, or explicitly preparing any namespaces. The xmlWriter is left open, allowing other snippets to be added to it.
    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows Server 2016, Windows Server 2012, Windows Server 2008. Please ensure you have the latest Service Pack for your operating system installed.

    See Also