473,400 Members | 2,145 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,400 software developers and data experts.

How do I create an XML file for my VB 2005 App?

I would like to plug in a bunch of static, but related, information into a
XML file that can be used by my VB.NET 2005 utility application.

I would like to do something like:

<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
....
....

How do I initially create this sort of XML file for my app? Can I use
VS.NET 2005 IDE or must I do it by hand or use a third party XML editor
tool?

How do I read it?

I see a lot about how to work with consuming an XML file, but never see
anything about creating on for your own application and consuming it.

Any help or direction would be appreciated.


Dec 11 '05 #1
5 938
Take a look at XmlTextWriter class.

--
Vladimir
"dm1608" <dm****@spam.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I would like to plug in a bunch of static, but related, information into a
XML file that can be used by my VB.NET 2005 utility application.

I would like to do something like:

<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
...
...

How do I initially create this sort of XML file for my app? Can I use
VS.NET 2005 IDE or must I do it by hand or use a third party XML editor
tool?

How do I read it?

I see a lot about how to work with consuming an XML file, but never see
anything about creating on for your own application and consuming it.

Any help or direction would be appreciated.

Dec 11 '05 #2
dm1608 wrote:
I would like to plug in a bunch of static, but related, information
into a XML file that can be used by my VB.NET 2005 utility
application. [snip] How do I initially create this sort of XML file for my app? Can I use
VS.NET 2005 IDE or must I do it by hand or use a third party XML
editor tool?
XML is just plain text, so for a single-occurrence file, just create
it using any plain-text editor. If you want to ensure it is created
accurately and consistently, however, use a proper XML editor. If it
really is a 1-off task, using an IDE is probably overkill unless there
is some programmatically-accessible data that needs including that you
can't get at by hand-editing.
How do I read it?
Open it in a plain-text editor if you mean "how do I, as a human, read
it". Otherwise it depends what you want to do with it afterwards: it's
a file, so you open it in some kind of application.
I see a lot about how to work with consuming an XML file, but never
see anything about creating on for your own application and consuming
it.


This is worrying. A plain-text file is not hard to create. As someone
who writes a lot of documentation, I would value your input (off-group)
as to what we tech authors are not explaining that need explaining.
We've clearly missed something important here. And I'd appreciate more
input from others in the same position (but not here: use email).

///Peter
--
XML FAQ: http://xml.silmaril.ie/

Dec 11 '05 #3
DM

Just use a XML dataset, there are plenty of samples how to do that on our
website.

http://www.vb-tips.com/default.aspx

I hope this helps,

Cor
Dec 12 '05 #4
You can choose Add/ New Item from the Project context menu, and choose "Xml
File". This will create a new blank Xml File in the IDE that you can edit.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"dm1608" wrote:
I would like to plug in a bunch of static, but related, information into a
XML file that can be used by my VB.NET 2005 utility application.

I would like to do something like:

<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
....
....

How do I initially create this sort of XML file for my app? Can I use
VS.NET 2005 IDE or must I do it by hand or use a third party XML editor
tool?

How do I read it?

I see a lot about how to work with consuming an XML file, but never see
anything about creating on for your own application and consuming it.

Any help or direction would be appreciated.


Dec 12 '05 #5
Once you have the xml file created and is stored in a known location, it is
extremely easy to read an XML file using the XmlDocument class.

Try this:

Dim XmlDoc As New System.Xml.XmlDocument

XmlDoc.Load("filename.xml")

Paul Wu

www.rulemasters.com

"dm1608" <dm****@spam.net> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I would like to plug in a bunch of static, but related, information into a
XML file that can be used by my VB.NET 2005 utility application.

I would like to do something like:

<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
<shortname>
<longname>
<description>
<version>
<dateupdated>
</shortname>
...
...

How do I initially create this sort of XML file for my app? Can I use
VS.NET 2005 IDE or must I do it by hand or use a third party XML editor
tool?

How do I read it?

I see a lot about how to work with consuming an XML file, but never see
anything about creating on for your own application and consuming it.

Any help or direction would be appreciated.

Dec 27 '05 #6

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

Similar topics

4
by: johnb41 | last post by:
I need to create a Dataset and datatable from an XML file. The only way I know how to make a Dataset and Datatable, is by using an Access database as my datastore: You know, the usual thing in...
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
5
by: dm1608 | last post by:
I would like to plug in a bunch of static, but related, information into a XML file that can be used by my VB.NET 2005 utility application. I would like to do something like: <shortname>...
11
by: mesut demir | last post by:
Hi All, When I create fields (in files) I need assign a data type like char, varchar, money etc. I have some questions about the data types when you create fields in a file. What is the...
10
by: Steve | last post by:
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains custom functions. I believe I need to use COM interop to allow VBA code in Excel 2002 to access it. I've studied...
4
by: hellCoder | last post by:
Hi, I'm facing a nightmare here... I had Visual Studio 2003 installed and working perfectly but I decided to install Visual Studio 2005 just to begin to use it. The installation of the VS 2005...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello, mister I have an application web asp.net 2.0 + vs 2005 and VS 2005 Web Application Project. Its appears this error in execution: "Cannot Create/Shadow Copy '<projectname>' when that...
0
by: ricoiii | last post by:
Hello, i have created a service in vb.net 2005 and want to create an access-database at runtime. The code is: Dim cat As ADOX.Catalog cat = CreateObject("ADOX.Catalog") If...
6
by: Mr. X. | last post by:
Hello. How can I create aspnetdb from scratch ? (I want a script that create all table, views, etc... on that database). Thanks :)
10
by: AAaron123 | last post by:
I want to create a database with one table on the host. I can't user SQL Server Management Studio to do it so I guess I have to do it programmatically. I have in mind that in the session start...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.