473,378 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

XML Help wanted

I'm new to vb.net and have never used xml. However, xml looks pretty
straight forward and I would like to learn how use it to create a
configuration file for a small app.

I got the xmlTextWriter to write out a file and I thought "Oh! this
must be the way!" But now I'm backing off from it because even though
it wrote a file I'm not sure that the file is correct xml and there are
many classes that seem to work with xml files and I may not be using
the best choice.

So I would like to ask which class would be the best to use to create
what I want? Also a small code snippet showing me how to use the
class(es) would help.

Let's say I have two configuration elements I want to store and
retrieve:

DirectoryPath and DatabaseName

And the values were "C:\mypath" and "myDatabase"

Thanks in advance.

Mar 8 '06 #1
1 835
deamron,

As there is one thing not straight foreward than it is XML, the
documentation that describes it seems to be more than a meter high. It is a
way to transport data where the description of that is given.

An easy way to use it is as the dataset.
Simple made typed here.

dim ds as new dataset
dim dt as new datatable
ds.add(dt)
dt.columns.add("myItem1")
dt.columns.add("myItem2")
dt.loaddatarow(new Object() {"deamron", "cor"}, true)

To write it
ds.writexml(mypath)
To read it than again
ds.readxml(mypath)

There are more methods to add a row by the way.

I hpe this helps,

Cor

"edamron" <ed*****@spamcop.net> schreef in bericht
news:11*********************@p10g2000cwp.googlegro ups.com...
I'm new to vb.net and have never used xml. However, xml looks pretty
straight forward and I would like to learn how use it to create a
configuration file for a small app.

I got the xmlTextWriter to write out a file and I thought "Oh! this
must be the way!" But now I'm backing off from it because even though
it wrote a file I'm not sure that the file is correct xml and there are
many classes that seem to work with xml files and I may not be using
the best choice.

So I would like to ask which class would be the best to use to create
what I want? Also a small code snippet showing me how to use the
class(es) would help.

Let's say I have two configuration elements I want to store and
retrieve:

DirectoryPath and DatabaseName

And the values were "C:\mypath" and "myDatabase"

Thanks in advance.

Mar 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Tony Marston | last post by:
If the use of the browser's BACK button is interfering with the operation of your web application then take a look at this article entitle "Back Button Blues" ...
6
by: DJ Majestik | last post by:
OK, I am devising a php page that will handle a form submission, and wanted to know if anyone has already setup such an idea, or if you had links to point to good tutorials on this. Basically I...
0
by: Gary Davis | last post by:
Freelance PHP programmer wanted, preferably in the Sarasota, Florida area. Tampa, Orlando, Fort Myers areas also ok. Email Larry at lkelleher at freedomvillage dot com. x-- 100 Proof News -...
7
by: Mark Hahn | last post by:
(I apologize in advance if this is not an appropriate posting) I have written a simple windows shareware app, EzPicMailer, in Python 2.3, wxPython 2.4.1, and PIL 1.1.4 that lets computer novices...
1
by: Bluexcell | last post by:
I want to create the Python equivalent of an endless loop that i use in Iptscrae: In Iptscrae one creates a dummy spotstate loop and places the calls to routines inside that.. like this: ON...
3
by: alexk | last post by:
Hi, I would like to request your help. My problem is as follows. I want to match urls, and therefore I have a group of long valid domain names in my regex: ........
4
by: dreamcatcher | last post by:
I wrote the following program which gets student id, and name, and score, store them into a file, use qsort() to sort the score, but seems when I wanted to inquire specific student's info using...
5
by: | last post by:
Trying to learn about manipulating collections of objects, and populating these objects dynamically from datasources. Could someone post a code sample that shows the following: Instantiating a...
1
by: imghani | last post by:
Hi all, I have developed an application in ASP.NET. I wanted that whenever a user comes to my website, it opens browser in F11 mode. I find the code to open browser in F11 mode (its javascript)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.