ISerializerOutput2::SerializeAttribute Method

HRESULT SerializeAttribute([in] VARIANT * value, [in] BSTR Name, [in] BSTR Namespace);

Serializes the COM value as an XML attribute. The serializer engine will use the serializerFactory to find a simepleType serializer for the specified COM type.

 

Parameters

value
VARIANT *, [in]: The value of the attribute
Name
BSTR, [in]: The localname of the attribute
Namespace
BSTR, [in]: The namespace of the attribute

 

Return Values

 

Sample Code

Private Sub ISoapSerializer_Serialize(  theVal As Variant, _
                                        ByVal ctx As PocketSOAP.ISerializerContext, _
                                        ByVal dest As PocketSOAP.ISerializerOutput)
        Dim val As Person
        Set val = theVal
        Dim d2 As ISerializerOutput2
        Set d2 = dest
        d2.SerializeAttribute val.name, "Name", ""
        d2.SerializeAttribute val.Male, "Male", ""
        dest.SerializeValue val.Age, "Age", "http://soapinterop.org/xsd"
        dest.SerializeValue val.id, "ID", "http://soapinterop.org/xsd"
End Sub

 

See Also

The ISerializerOutput2 Interface | 

 

 

Copyright

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