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.



VARIANT *, [in]: The value of the attribute
BSTR, [in]: The localname of the attribute
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, "Name", ""
        d2.SerializeAttribute val.Male, "Male", ""
        dest.SerializeValue val.Age, "Age", ""
        dest.SerializeValue, "ID", ""
End Sub


See Also

The ISerializerOutput2 Interface | 




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