473,395 Members | 1,539 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,395 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 1311
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

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>...
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>...
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...
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 :)
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.