I'm not familiar with the .Net API, coming from the Java world that is, and having implemented a SAX parser for the Upcoming output.
It is possible that your query returns > 1 event element and your code has a problem picking that up.
> -------- Original Message --------
> Subject: [yws-events] ASP.NET and Upcoming API
> From: "stewsterl" < stewsterl%40comcast.net">stewsterl
comcast.net>
> Date: Wed, October 10, 2007 9:35 am
> To: yws-events%40yahoogroups.com">yws-events
yahoogroups.com
>
> I'm currently working on an ASP.NET site that needs to use the
> Upcoming API.
>
> I have the following code to get the returned XML:
>
> Dim url As String = "http://upcoming.yahooapis.com/services/rest/?
> method=venue.search&location=Troy,3;MI&api_key=<Your Key>"
>
> Dim RequestXMLstring As String = "<?xml version='1.0'?
> ><element1>Some Value</element1>"
> Dim XmlResult As New System.Xml.XmlDocument
> Dim anXMLhttpObject As Object
> anXMLhttpObject = Server.CreateObject("MSXML2.ServerXMLHTTP")
>
> Try
> anXMLhttpObject.open("POST", url, False)
> Catch
> Response.Write("Connection cannot be established. Please
> try again later.")
> End Try
>
> anXMLhttpObject.setRequestHeader("Content-
> Type", "application/x-www-form-urlencoded")
>
> anXMLhttpObject.setRequestHeader("Content-Length", Len
> (RequestXMLstring))
>
> anXMLhttpObject.send(RequestXMLstring)
>
> Dim strResult As String = anXMLhttpObject.responseText
>
> XmlResult.LoadXml(strResult)
>
> '***************************************
>
> Dim bodyAttrib As System.Xml.XmlNodeList =
> XmlResult.SelectNodes("rsp/")
>
> For Each attr As XmlNode In bodyAttrib
> Dim name As XmlAttribute = DirectCast
> (attr.Attributes.GetNamedItem("name"), XmlAttribute)
> Dim val As XmlAttribute = DirectCast
> (attr.Attributes.GetNamedItem("description"), XmlAttribute)
> If name IsNot Nothing AndAlso val IsNot Nothing Then
> TextBox1.Text = name.Value & val.Value
> End If
> Next
>
> I get the results just fine. I'm having a little trouble parsing the
> xml here -->XmlResult.SelectNodes("rsp/")
> I've tried: XmlResult.SelectNodes("rsp/event")
> No luck.. Anyone have any ideas?
>
> Thank you in advance..
.