Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 January 18th, 2005, 02:04 PM
Authorized User
 
Join Date: Jan 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating a xml ad file from a database source

hi, i have an adrotator webcontrol which i like to update its xml adfile from data stored in a sql database. how could i read this data from a dataset and build an advertisement file in its schema efficiently, i mean if is there any method that help me to do that instead of writing the adfile xml schema tag by tag. thanks....

 
Old January 20th, 2005, 07:57 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

DataSet have methods to create XML.Use that to create adfile.

 
Old January 21st, 2005, 01:56 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

You might want to look into the following methods.

1. WriteXml
2. ReadXml
3. ReadXmlSchema
4. WriteXmlSchema

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old January 21st, 2005, 04:53 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

you can simply make your xml and it's schema,
Code:
objDataSet.WriteXml("C:\\...\\file.xml");//your XMLFile
objDataSet.WriteXmlSchema("C:\\...\\schema.xsd");//your Schema
if you encounter some errors about access control you should change the permissions and roles of your user where you make your result files.
(also you can write your result inside a temporary stream).

_____________________________
Mehdi.
software engineering student.
Looking for a good job for summer 2005.
 
Old January 21st, 2005, 05:53 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

I meant from a temporary stream a MemoryStream,for not dealing with disk(not a Temp File).

_____________________________
Mehdi.
software engineering student.
Looking for a good job for summer 2005.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Add existing AD user to AD group via ADSI? thiazi Classic ASP Basics 0 August 24th, 2007 09:27 PM
Creating an XML file from XSD squatss C# 4 January 16th, 2007 08:41 AM
creating new xml file from existing deepee XML 1 July 25th, 2006 10:35 AM
XML, MYSQL ad PHP imaginethis Pro PHP 4 October 27th, 2004 10:27 AM
Error while creating User acc In AD spraveens Classic ASP Components 0 June 12th, 2004 08:17 AM





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