ISoapDeSerializerAttributes::Exists Method

HRESULT Exists([in] BSTR Name, [in] BSTR Namespace, [out, retval] VARIANT_BOOL * Exists);

This allows you to check to see if a particular attribute exists in the element being de-serialized.



BSTR, [in]: The name of the attribute
BSTR, [in]: The namespace URI of the attribute
VARIANT_BOOL *, [out, retval]: returns VARIANT_TRUE if it exists, otherwise returns VARIANT_FALSE


Return Values

returns VARIANT_TRUE if there is an attribute with a matching name and namespace URI, otherwise returns VARIANT_FALSE


Sample Code

Option Explicit

Implements ISoapDeSerializer

Private Sub ISoapDeSerializer_Start(ByVal node As PocketSOAP.ISOAPNode, ByVal ElementName As String, ByVal Attributes As PocketSOAP.ISoapDeSerializerAttributes, ByVal ns As PocketSOAP.ISOAPNamespaces)
    If Not Attributes.Exists("arrayType", "") Then
        Err.Raise vbObjectError + 9876, , "Array is missing arrayType attribute!"
    End If
End Sub


See Also

The ISoapDeSerializerAttributes Interface | 




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