?
Solved

from dataset to xml

Posted on 2003-11-12
4
Medium Priority
?
445 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 750 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

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

800 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