Hi all, this is my first post, i have a little problem.
I'm tryign to read a specific atribute from a xml website using this code:
...
...
The problem is tmpIn takes diferents values (string) when the function is used and sometimes this works, and othertimes it gives an error (Invalid character in the given encoding. Line 9, position 15.), but is not because of the url, is when it tries to read the coordinates... any ideas how can i fix this? or change to a better code? any help is welcome..
thx in advance
I'm tryign to read a specific atribute from a xml website using this code:
...
Code:
'this is the url im trying to read, tmpIn is a string that complete the url:
Dim url As String = "http://maps.google.com/maps/geo?q=" & tmpIn & "&output=xml"
Dim reader As New XmlTextReader(url)
reader.WhitespaceHandling = WhitespaceHandling.Significant
While (reader.Read())
'now i try to read the atribute coordinates from the url to a string tmpLatLong:
If reader.Name.ToString() = "coordinates" Then
tmpLatLong = reader.ReadString().ToString()
End If
End While
The problem is tmpIn takes diferents values (string) when the function is used and sometimes this works, and othertimes it gives an error (Invalid character in the given encoding. Line 9, position 15.), but is not because of the url, is when it tries to read the coordinates... any ideas how can i fix this? or change to a better code? any help is welcome..
thx in advance
Comment