471,309 Members | 1,044 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,309 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 904
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by johnb41 | last post: by
reply views Thread by =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post: by
6 posts views Thread by Mr. X. | last post: by
10 posts views Thread by AAaron123 | last post: by

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.