My XML generated is as follows:
<helpers>
<person>
<latitude>17.123</latitude>
<longitude>83.322</longitude>
</person>
<person>
<latitude>17.123</latitude>
<longitude>83.322</longitude>
</person>
</helpers>
I receive XML as response after POST to webpage. My VB.net code is as follows:
Using reader = XmlReader.Create(New StringReader(e.Result.ToString()))
While reader.Read()
If reader.NodeType = XmlNodeType.Element And reader.Name = "person" Then
ParseAuthor(reader)
End If
End While
End Using
Sub ParseAuthor(ByVal MyReader As XmlReader)
Dim lat, lng As String
MyReader.ReadToFollowing("latitude")
lat = MyReader.ReadElementContentAsString()
MyReader.ReadToFollowing("longitude")
lng = MyReader.ReadElementContentAsString()
mapCenter = New GeoCoordinate(CType(lat, Double), CType(lng, Double))
Dim position = PositionOrigin.Center
imgLayer.AddChild(imgPinMembers, mapCenter, position)
End Sub
I am getting an error at
MyReader.ReadToFollowing("latitude")
and it says
ReadElementContentAsString メソッドは、ノード タイプ None ではサポートされていません。
誰かがバグを指摘できますか?助けてください。ありがとう。