Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 1st, 2007, 11:48 AM
Registered User
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to export the data to XML file format?

I have to export the recordset data to XML file in my vb 6.0 application.

XML file should be in predefined XML format and XDR file is also given along with that.I am using MSXML to do this.

I was wondering if anyone can suggest a better way to do this.

Old March 13th, 2007, 10:19 AM
Friend of Wrox
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts

If it's coming from SQL, you could investigate the use of "FOR XML AUTO" in the query. I am by no means any expert with this, but have used it a little in the past and know that it can produce basic forms of XML.


Sean Anderson
Old April 3rd, 2007, 12:22 PM
Authorized User
Join Date: Mar 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Raghunathan


If You Are Using ADO Recordset Object then the job is simpler

'fill the records from the database table into a ADO Recordset for example rsEmployees

'write the following piece of code to get the xml document from the recordset object along with a Schema

rsEmployees.Save "C:\Data.xml",adPersistXML

thats all u will have the xml format of the recordset data stored in the file C:\Data.xml

hope this wud help u solve the above problem..


Similar Threads
Thread Thread Starter Forum Replies Last Post
export excel file ( format is changed ) urgent palanivel jayanthi ASP.NET 1.0 and 1.1 Professional 1 March 12th, 2007 05:32 PM
export excel file ( format is changed ) urgent palanivel jayanthi ASP.NET 1.0 and 1.1 Basics 1 March 12th, 2007 05:31 PM
export data from Access to XML file with VB2005 larspersoon Visual Basic 2005 Basics 2 November 25th, 2005 09:41 AM
Changing date format in a file export from excel t jonwitts Excel VBA 2 July 21st, 2005 04:22 AM
export data to .dat format chacquard Access VBA 6 January 10th, 2005 03:50 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.