Results 1 to 2 of 2

Thread: [RESOLVED] [2005] Throwing a String into a stream

  1. #1

    Thread Starter
    Lively Member mightor's Avatar
    Join Date
    Apr 2007
    Location
    Turn around, I'm right behind you...
    Posts
    99

    Resolved [RESOLVED] [2005] Throwing a String into a stream

    Hey peeps,

    I have yet another question. After having stolen the wonderful AsyncDownloader code from the DownloadStringAsync - How? thread, I have a question. How do I turn the resulting String into a StreamReader of some kind so I can connect it to the code below:

    Code:
            Dim sr As New System.IO.StreamReader("status.xml")
    
            ' The XmlTextReader
            Dim xr As New System.Xml.XmlTextReader(sr)
    
            ' The XmlDocument
            Dim serverStatus As New System.Xml.XmlDocument
            serverStatus.Load(xr)
    
            Dim serverNodes As System.Xml.XmlNodeList = serverStatus.SelectNodes("rs/r")
    Where I have the StreamReader connected to the status.xml file, I'd like to put a String from System.Net.DownloadStringCompletedEventArgs.Result since it now contains the file contents of status.xml. I was using a local copy for testing purpose but the real source is on the web.

    Any ideas or pointers?

  2. #2

    Thread Starter
    Lively Member mightor's Avatar
    Join Date
    Apr 2007
    Location
    Turn around, I'm right behind you...
    Posts
    99

    Re: [2005] Throwing a String into a stream

    l'll answer my own post. The answer was StringReader. Duh.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width