DataConvert.WriteDictionaryToXml Method
Writes the specified dictionary data to a XmlWriter object.
Namespace: Microsoft.SharePoint.Client
Assemblies: Microsoft.SharePoint.Client.Silverlight.Runtime (in Microsoft.SharePoint.Client.Silverlight.Runtime.dll); Microsoft.SharePoint.Client.Runtime (in Microsoft.SharePoint.Client.Runtime.dll)
Syntax
'Declaration
Public Shared Sub WriteDictionaryToXml ( _
writer As XmlWriter, _
dict As Dictionary(Of String, Object), _
topLevelElementTagName As String, _
keys As String(), _
serializationContext As SerializationContext _
)
'Usage
Dim writer As XmlWriter
Dim dict As Dictionary(Of String, Object)
Dim topLevelElementTagName As String
Dim keys As String()
Dim serializationContext As SerializationContextDataConvert.WriteDictionaryToXml(writer, _
dict, topLevelElementTagName, keys, _
serializationContext)
public static void WriteDictionaryToXml(
XmlWriter writer,
Dictionary<string, Object> dict,
string topLevelElementTagName,
string[] keys,
SerializationContext serializationContext
)
Parameters
writer
Type: System.Xml.XmlWriterThe XmlWriter object used to write the specified dictionary data.
dict
Type: System.Collections.Generic.Dictionary<String, Object>A collection of keys and values that is used as the source of the data conversion.
topLevelElementTagName
Type: System.StringThe XML element tag name to write to the XmlWriter object argument.
keys
Type: []An array of String used to determine which data in the dictionary object is written to the passed XmlWriter object.
serializationContext
Type: Microsoft.SharePoint.Client.SerializationContextAn object that stores the client object path in the client hierarchy, so that the client object can be serialized and deserialized.
Remarks
This method writes the data to the XmlWriter object only if each key in the keys collection parameter exists in the dictionary.