hexadecimal value 0x1F, is an invalid character

LeacepleCreve

New Member
I am getting the following error:' ', hexadecimal value 0x1F, is an invalid character Here is my function. I get this error when it hits "reader.MoveToContent()" for the first time. Can anyone point me in the right direction?\[code\]Public Function GetSyndicationFeedData(ByVal urlFeedLocation As String) As SyndicationFeed Dim settings As New XmlReaderSettings() With { _ .IgnoreWhitespace = True, _ .CheckCharacters = True, _ .CloseInput = True, _ .IgnoreComments = True, _ .IgnoreProcessingInstructions = True _ } If [String].IsNullOrEmpty(urlFeedLocation) Then Return Nothing End If Using reader As XmlReader = XmlReader.Create(urlFeedLocation, settings) If reader.ReadState = ReadState.Initial Then reader.MoveToContent() End If ' Now try reading... Dim atom As New Atom10FeedFormatter() Dim rss20 As New Rss20FeedFormatter() ' Atom If atom.CanRead(reader) Then atom.ReadFrom(reader) Return atom.Feed 'Rss 2.0 ElseIf rss20.CanRead(reader) Then rss20.ReadFrom(reader) Return rss20.Feed Else Return Nothing End If End UsingEnd Function\[/code\]
 
Back
Top