|
The ProgrammingMSAccess.COM Site This procedure demonstrates how to INVOKE THE SSSWSDemo SERVICE with A wEB REFERENCE NAME OF CABLAT. The Ten_most_expensive_products web method returns an xml object, and the procedure parses the document to display the first and third child nodes from the returned xml document. Private Sub Button2_Click(ByVal sender As System.Object, _ByVal e As System.EventArgs) Handles Button2.Click
Dim xws1 As New cablat.SSSWSDemo Dim response As New Object Dim result As System.Xml.XmlElement
'Populate object and pass to 'XmlElement variableresponse = xws1.Ten_Most_Expensive_Products result = response(0)
'Extract first child node from 'result set and insert into Label1 Dim xdc1 As New System.Xml.XmlDocumentxdc1.LoadXml(result.FirstChild.OuterXml) Label1.Text = xdc1.OuterXml
'Extract third child node from 'result set and append to Label1xdc1.LoadXml(result.FirstChild. _ NextSibling.NextSibling.OuterXml) Label1.Text &= xdc1.OuterXml
End Sub
Learn more about VB.NET programming from either Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .NET or Programming Microsoft Visual Basic .NET for Microsoft Access Databases. Copyright 2003 CAB, Inc. All rights reserved. Republication or redistribution
of CAB, Inc. content, including by framing or similar means, is expressly
prohibited without the prior written consent of CAB, Inc. CAB, Inc. shall not be
liable for any errors in the content, or for any actions taken in reliance
thereon.
|