HRESULT Attribute([in] BSTR Name, [in] BSTR Namespace, [in] BSTR value);
Writes an attribute and value to the stream. A prefix will be generated for the namespace as required.
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) Dim a As AuthInfo Set a = Val dest.Attribute "Type", NS, a.authType dest.WriteText a.authKey End Sub This inserts x:Type='authType'>AuthKey into the stream, note that the serialization engine adds the containing element info, so the total results xml would be <h:Auth x:Type='authType'>AuthKey</h:Auth>
Copyright © Simon Fell, 2000-2004. All rights reserved.