Results 1 to 3 of 3

Thread: [2008] XML Favorites

  1. #1

    Thread Starter
    New Member NotMyRealName's Avatar
    Join Date
    Feb 2009
    Posts
    13

    [2008] XML Favorites

    Hi guys,

    I'm making a Tabbed Web Browser, and I need favorites to add to this web browser, I was searching this forum for answers on how to do it and I ran into some threads tlaking about XML and how they are easily controlled, yet a little more complex. How do I do this? Where do I start? Help!?

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2008] XML Favorites

    You can use serialization to save and load data to XML very easily:

    Code:
        Dim Favs As New List(Of String)
        Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Favs.Add("http://www.google.com")
            Favs.Add("http://www.vbforums.com")
    
            Dim x As New System.Xml.Serialization.XmlSerializer(Favs.GetType())
            Dim sw As New IO.StreamWriter("C:\Temp\Favs.xml")
            x.Serialize(sw, Favs)
            sw.Close()
    
    
         End Sub
    Then to load it:

    Code:
    Favs = New List(Of String)
            Dim x As New System.Xml.Serialization.XmlSerializer(Favs.GetType())
            Dim sr As New IO.StreamReader("C:\Temp\Favs.xml")
            Favs = DirectCast(x.Deserialize(sr), List(Of String))
            sr.Close()

  3. #3

    Thread Starter
    New Member NotMyRealName's Avatar
    Join Date
    Feb 2009
    Posts
    13

    Re: [2008] XML Favorites

    How do I add two textboxes into this?

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