Serialization of Enhanced Presence Category Instances
With XML Schema Definition (XSD) files, you can generate presence data according to schema specifications.
To generate the data class from a schema:
Create .NET Framework classes for the XML types defined in the XSD files. You can accomplish this by using Microsoft Xml Schema/DataTypes Support Utility (XSD.EXE). This tool is part of the .NET Framework SDK.
Create presence data object by instantiating the resultant classes and assigning appropriate values.
Serialize the presence data object to obtain its XML representation.
Attach the XML blob to the SIP message body. The process used to attach an XML blob to a SIP message depends on the API used by your application.
In This Section
Creating Enhanced Presence Data Classes from the XML Schemas
Demonstrates how to use XSD.EXE to create C# classes from a given XSD file.Instantiating and Initializing an Enhanced Presence Data Class
Demonstrates how to instantiate and initialize an Enhanced Presence data class in C#.Serializing an Enhanced Presence Data Object to an XML Element
Demonstrates how to serialize an Enhanced Presence data object in C# to create the corresponding XML string.
See Also
Reference
Lync-Defined Enhanced Presence Category Instance Elements