I am trying to bind an xml document to a control but am getting the error:
The same table (wind) cannot be the child table in two nested relations.
I have done some reading on the problem and understand that it is an issue with the way the dataset reads the xml doc even though it is well formed.
Does anyone know an easy fix for this problem or how to approach it? I only have a basic understanding of xml
--Begin weather.xml->
en_US
C
km
km/h
mb
mm
Fremantle, Australia
11:01 AM
-32.05
115.75
6:03 AM
6:56 PM
8
2/26/04 10:00 AM Local Time
Perth, Australia
25
25
Fair
34
1,012.9
steady
8
N/A
260
W
50
Unlimited
6
Moderate
14
2/26/04 8:09 AM Local Time
31
21
6:03 AM
6:56 PM
32
Sunny
24
N/A
183
S
0
50
31
Clear
23
N/A
164
SSE
0
62
31
21
6:04 AM
6:55 PM
32
Sunny
24
N/A
186
S
0
50
31
Clear
23
N/A
157
SSE
0
65
32
20
6:05 AM
6:54 PM
32
Sunny
23
N/A
166
SSE
0
52
33
Mostly Clear
16
N/A
124
SE
10
56
32
20
6:05 AM
6:53 PM
30
Partly Cloudy
18
N/A
175
S
10
51
29
Partly Cloudy
13
N/A
176
S
20
64
johnPosted Feb 27, 2004, 10:29 PM
Private Function GetXMLContent(ByVal ContentURL As String) As XmlReader Try 'create an HTTP request. Dim wr As HttpWebRequest = CType(WebRequest.Create(ContentURL), HttpWebRequest) wr.Timeout = 10000 ' 10 seconds 'get the response object. Dim resp As WebResponse = wr.GetResponse() Dim stream As stream = resp.GetResponseStream() ' load XML document Dim reader As XmlTextReader = New XmlTextReader(stream) reader.XmlResolver = Nothing Return reader Catch ex As Exception 'todo - return some error code. End Try End Function Private Sub BindWeatherFeed(ByVal inURL As String) Try Dim myFeed As New DataSet myFeed.ReadXml(GetXMLContent(inURL)) 'now refer to the item node, which we can then obtain 'all our days weather items underneath the path. weatherRss.DataSource = myFeed.Tables("dayf") <----I thought it may just read everything under the dayf node and solve my problem: weatherRss.DataBind() Catch ex As Exception 'todo - return some error code. End Try End SubAny help or advice would be appreciated:)Mahesh ChandPosted Feb 27, 2004, 10:42 AM
88