ISerializerOutput::EndElement Method

HRESULT EndElement([in] BSTR Name, [in] BSTR Namespace);

Creates a closing element in the stream. Typically this is not used, you would normally use SerializeNode or SerializeValue to generate any child nodes, as these functions will automatically apply the multi-ref encoding rules for you.

 

Parameters

Name
BSTR, [in]: The element name
Namespace
BSTR, [in]: the namespace URI for the element, the serializer engine will automatically map a prefix to this URI for you

 

Return Values

 

Sample Code

Visual Basic Class File

Implements ISoapSerializer

Private Const NS = "http://auth.example.org/2001/01/"

Private Sub ISoapSerializer_Serialize(  Val As Variant, _
                                        ByVal ctx As PocketSOAP.ISerializerContext, _
                                        ByVal dest As PocketSOAP.ISerializerOutput)
    dest.StartElement "Key", NS
    Dim a As AuthInfo
    Set a = Val
    dest.WriteText a.authKey
    dest.EndElement "Key", NS
    dest.StartElement "Type", NS
    dest.WriteText a.authType
    dest.EndElement "Type", NS
End Sub


When called this would add <x:Key>AuthKeyValueHere</x:Key><x:Type>AuthTypeValueHere</x:Type> to the serialization stream, 
in addition a namespace declaration xmlns:x='http://auth.example.org/2001/01/' would be added so that the x prefix is in scope.

 

See Also

The ISerializerOutput Interface | 

 

 

Copyright

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