Display XML Feed Text in One Line in a Ticker

  • Thread starter Thread starter Austin Althouse
  • Start date Start date
A

Austin Althouse

Guest
Hello,

I am having a problem display a feed in a ticker. Here is my code:

Private Sub NOAA_Alerts()
Using WB As New WebClient
Try
WB.Headers.Add("User-Agent",)
WB.Headers.Add(HttpRequestHeader.Accept, "application/atom+xml")
Dim WXData As String = WB.DownloadString($"https://api.weather.gov/alerts/active?zone={My.Settings.Wx_Alerts}")
If WXData <> LastWXData Then
LastWXData = WXData
WXDict.Clear()
XmlDoc.LoadXml(WXData)
Dim TitleList As XmlNodeList = XmlDoc.GetElementsByTagName("title")
Dim CapEvents As XmlNodeList = XmlDoc.GetElementsByTagName("cap:event")
Dim SummaryList As XmlNodeList = XmlDoc.GetElementsByTagName("summary")
Label31.Text = SummaryList(0).InnerText
Label30.Text = CapEvents(0).InnerText
End If
Catch ex As Exception
End Try
End Using
End Sub
Dim LastWXData As String = ""

The text that is displayed is correct. However, the words go to the next line and since the ticker is a text scroll, it needs to be in one line. How can I tell the program to keep all text in one line?

Thank You!

Continue reading...
 
Back
Top