Solved

from dataset to xml

Posted on 2003-11-12
4
440 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
[X]
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
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 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