Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

from dataset to xml

Posted on 2003-11-12
4
439 Views
Last Modified: 2013-11-19
I'm new vb.net and XML.

In my app I'm selecting data from a SQL database into a dataset - no problem.
I can use dataset.writexml method to write out the data as XML but this inserts element tags as per database field names.

I need to write that data out as XML but to a given XML definition.
I've set up a .xsd mapping schema to match up the XML elements with corresponding database fields.

How can I now write out the data from the dataset and get it to use my .xsd mapping schema so that the XML output matches the required output?
Or should I be doing this another way?

Any help most appreciated.

0
Comment
Question by:stantheram
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
TRUENEUTRAL earned 250 total points
ID: 9733676
Why not write a view on the SQL side that renames the fields to match your new definition?

This has the added benefit of letting the database server do the work, rather than the application server.
0
 

Author Comment

by:stantheram
ID: 9739161
Thanks for your response.
I could do that, but it wouldn't sort out the complex types and nested elements properly.

I really would quite like to find out how to use the .xsd mapping file - so I could then run any query I want to, load the query results into a dataset (got that far), and always output in the same XML format.
0
 
LVL 5

Expert Comment

by:TRUENEUTRAL
ID: 10322101
Thank you :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
React or Angular? 6 80
.php tree directory? 5 83
Support for Notepad++ (including downloading & installing a plugin) 5 162
VB.NET String Settings and Temp Folder Question 3 55
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question