Results 1 to 2 of 2

Thread: Help with xml parsing!

  1. #1

    Thread Starter
    Hyperactive Member DerekM's Avatar
    Join Date
    Jun 2009
    Location
    Colorado
    Posts
    296

    Help with xml parsing!

    I'm having trouble figuring out how to read and write xml, could someone possible provide sample xml and code to parse it so I can understand it more? Is it possible to parse the xml from a textbox?

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Help with xml parsing!

    Code:
            'write out
            Dim myXMLDocument As XDocument = XDocument.Parse(TextBox1.Text)
            myXMLDocument.Save("C:\somefile.xml")
    
            'read in
            TextBox1.Text = XDocument.Load("C:\somefile.xml").ToString
    Of course you would want to use proper error handling in the event an error were to occur.

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