Results 1 to 13 of 13

Thread: Vb.net

  1. #1
    Kaat is offline VB.NET Forum Newbie
    .NET Framework
    Join Date
    Mar 2005
    Location
    Belgium
    Posts
    22
    Reputation
    102

    how do I read a simple xml file

    Hey,

    Question, how do I read a simple xml file like this
    Code:
     
    
    <?xml version="1.0" encoding="UTF-8" ?> - <family>- <name gender="Male"> <firstname>Tom</firstname> <lastname>Smith</lastname> </name>- <name gender="Female"> <firstname>Dale</firstname> <lastname>Smith</lastname> </name> </family>
    in VB.NET and write this information into a temporary database.

    Greetz
    Last edited by Neal; 09-26-2005 at 12:44 AM. Reason: Vague Subject Line...

  2. #2
    kulrom's Avatar
    kulrom is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 3.5
    Join Date
    May 2005
    Location
    Republic of Macedonia
    Posts
    2,855
    Reputation
    248
    temporary DB of which kind? related or text file, CSv ...?
    Kind regards

  3. #3
    Kaat is offline VB.NET Forum Newbie
    .NET Framework
    Join Date
    Mar 2005
    Location
    Belgium
    Posts
    22
    Reputation
    102
    related like an access db.

    greetz Kaat #9

  4. #4
    kulrom's Avatar
    kulrom is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 3.5
    Join Date
    May 2005
    Location
    Republic of Macedonia
    Posts
    2,855
    Reputation
    248
    Ok, let me make a demo as you could find more sense there ... btw, there are various techniques that know to parse xml files with .NET framework with using XmlTextReader, XmlDocument, XmlSerializer, DataSet and XpathDocument ... but i will make a demo with only one of them ... i hope you don't mind ... cheers

    brb

  5. #5
    kulrom's Avatar
    kulrom is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 3.5
    Join Date
    May 2005
    Location
    Republic of Macedonia
    Posts
    2,855
    Reputation
    248
    Ok, this is a demo that read from xml file and then save the data into Access DB ... Cheers
    Attached Files Attached Files

  6. #6
    levyuk is offline VB.NET Forum Master
    .NET Framework
    .NET 2.0 (VS 2005)
    Join Date
    Jun 2004
    Location
    Wales, UK
    Posts
    313
    Reputation
    118
    How about retrieving data from a database and putting it into an XML file?

  7. #7
    kulrom's Avatar
    kulrom is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 3.5
    Join Date
    May 2005
    Location
    Republic of Macedonia
    Posts
    2,855
    Reputation
    248
    Quote Originally Posted by levyuk
    How about retrieving data from a database and putting it into an XML file?
    Sorry but are you asking or proposing? Don;t object me as i'm not quite well with English
    Cheers

  8. #8
    jmcilhinney's Avatar
    jmcilhinney is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    11,358
    Reputation
    1544
    The simplest way to get data from a database into an XML file is to use one of the overloads of the DataSet.WriteXML() method.

  9. #9
    Kaat is offline VB.NET Forum Newbie
    .NET Framework
    Join Date
    Mar 2005
    Location
    Belgium
    Posts
    22
    Reputation
    102
    Thanx

    I gonna try it now, because yesterday I didn't had the time, I'll let you now if it works.

    greetz

  10. #10
    Kaat is offline VB.NET Forum Newbie
    .NET Framework
    Join Date
    Mar 2005
    Location
    Belgium
    Posts
    22
    Reputation
    102
    Thank you, it work fine, greetz

  11. #11
    Rat
    Rat is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 1.1 (VS 2003)
    Join Date
    Aug 2005
    Location
    Somewhere between 0 and 1
    Posts
    72
    Reputation
    99
    Quote Originally Posted by kulrom
    Ok, this is a demo that read from xml file and then save the data into Access DB ... Cheers
    How about doing the same with a listbox?

  12. #12
    kulrom's Avatar
    kulrom is offline VB.NET Forum All-Mighty
    .NET Framework
    .NET 3.5
    Join Date
    May 2005
    Location
    Republic of Macedonia
    Posts
    2,855
    Reputation
    248
    Hi, Rat
    Be sure to start your own thread instead of asking your question in another person's thread. That way, you will get the help you're seeking faster than by posting in someone else's thread, no matter how similar the problem is. Someone will help you out as soon as they can I'm sure.

    Regards

  13. #13
    Rat
    Rat is offline VB.NET Forum Enthusiast
    .NET Framework
    .NET 1.1 (VS 2003)
    Join Date
    Aug 2005
    Location
    Somewhere between 0 and 1
    Posts
    72
    Reputation
    99
    Quote Originally Posted by kulrom
    Hi, Rat
    Be sure to start your own thread instead of asking your question in another person's thread. That way, you will get the help you're seeking faster than by posting in someone else's thread, no matter how similar the problem is. Someone will help you out as soon as they can I'm sure.

    Regards
    Apologies bro ..

Bookmarks

Posting Permissions

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