Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 26 Jun 2009 13:39:18 -0400,    group: microsoft.public.dotnet.xml        back       


VB.Net program to create XML file   
I need to create an xml file from a VB program using fields returned from an 
sql query. I have a template that was provided for me and need to use 
verbatim. Since this is just a text file, I gather that I can just write out 
the file with all of the tags, etc., and name it .xml. Assuming that is 
correct what I might want to do is create a template so that if this file 
changes the names of the elements, all I have to do is change the template 
and if more elements get added I can then add them. Is there a tool that can 
do this for me? If I have to create one, any suggestions as to what I can 
put in the space where my variables go which won't interfere with any key 
words. Thank you for any help.
date: Fri, 26 Jun 2009 13:39:18 -0400   author:   Ellie

Re: VB.Net program to create XML file   
"Ellie"  wrote in message 
news:OnZQJUo9JHA.5064@TK2MSFTNGP03.phx.gbl...
> I need to create an xml file from a VB program using fields returned from 
> an sql query. I have a template that was provided for me and need to use 
> verbatim. Since this is just a text file, I gather that I can just write 
> out the file with all of the tags, etc., and name it .xml. Assuming that 
> is correct what I might want to do is create a template so that if this 
> file changes the names of the elements, all I have to do is change the 
> template and if more elements get added I can then add them. Is there a 
> tool that can do this for me? If I have to create one, any suggestions as 
> to what I can put in the space where my variables go which won't interfere 
> with any key words. Thank you for any help.
>

You could just treat as a txt file but that is normally poor practice as 
you'd be in charge of escaping special characters and other XML gotchas.
However there are a number of ways of doing this with VB. What version of VB 
are you using and can you show a small example of a template and how you 
know which data goes where?

-- 

Joe Fawcett (MVP - XML)
http://joe.fawcett.name
date: Sat, 27 Jun 2009 11:49:34 +0100   author:   Joe Fawcett am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us