ISerializerFactoryConfig::Deserializer Method

HRESULT Deserializer([in] BSTR Type, [in] BSTR TypeNamespace, [in] VARIANT_BOOL ArrayOf, [in] VARIANT ComType, [in] BSTR ProgID);

This registers a new de-serializer for a particular XML type [or array of]. The de-serializer is responsible for converting the XML Stream into a concrete COM type. You can register a deserializer for an existing [custom or standard] XML type, and it will replace the existing de-serializer, for example this allows you to replace the standard array deserializer with one that deserializes arrays into a COM collection object, rather than a SAFEARRAY.

 

Parameters

Type
BSTR, [in]: The Xml Type name that this deserializer can deserialize
TypeNamespace
BSTR, [in]: The Xml Type namespace that this deserializer can deserialize
ArrayOf
VARIANT_BOOL, [in]: Does this deserialize a single instance of the type, or an array of the type ?
ComType
VARIANT, [in]: The resulting COM type following a successful deserialization
ProgID
BSTR, [in]: The ProgID of the deserializer to register

 

Return Values

///todo: discuss the possible return values

 

Sample Code

dim e
set e = CreateObject("pocketSOAP.Envelope.2")
e.setMethod "echoFloat", "http://soapinterop.org/"
e.Parameters.Create "inputFloat", 42.42
' when parsing, deserialize a {urn:xml-soap-address-demo}phone element with the property bag deserializer
e.SerializerFactory.Deserializer "phone", "urn:xml-soap-address-demo", false, "AddressBook.Phone", "pocketSOAP.SerializerPB.1"
...

 

See Also

The ISerializerFactoryConfig Interface | 

 

 

Copyright

Copyright © Simon Fell, 2000-2004. All rights reserved.