Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7875345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:58:02+00:00 2026-06-03T02:58:02+00:00

I am currently working on a website. I have been asked to be able

  • 0

I am currently working on a website. I have been asked to be able to allow admins to save tables in the database to an XML file (so they can download it from their browser).

I don’t even know where to begin. I’ve done multiple hours of research but this process doesn’t seem very well documented. I would appreciate some pointers in the right direction, or if possible, a more in-depth explanation.

How would I set-up my files? How can I make them download that file instead of saving it into my application? How would I even save it to an XML file to start?

I’ve seen some stuff online about backing your database into an XML file, but I feel that this is different as it allows users to download a database file instead of the developer making one.

EDIT

For clarity’s sake the XML should resemble the database.
So, if I have a Product (or products), I would hope the XML looks something similar to the following:

<product>
     <title>
          My Product
     </title>
     <price>
          5.00
     </price>
     <quantity>
          4
     </quantity>
     <description>
          This is my product!
     </description>
</product>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:58:04+00:00Added an answer on June 3, 2026 at 2:58 am

    The query you might want is:

    SELECT col1, col2, col3 etc.
      FROM dbo.TableName
      FOR XML AUTO, ELEMENTS;
    

    Run that in Management Studio to see what it returns. I think you need to split your question into multiple parts. This one is how you generate XML from a table. A different question will be how to consume that from C# and save it to a file. These questions might give you a head start, but I don’t know if you will need to do anything differently in MVC3 (I know how to spell it, but not much else):

    How to save this string into XML file?

    Save xml string or XmlNode to text file in indent format?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on a website and lately have been using GD with
I am currently working on a website that will have a high volume of
I'm working on a relatively simple website with (currently) a single resource. I have
I'm currently working on a web app, and have been inspired by a couple
I'm currently working on a 100,000 page website, the current design has been in
I have been working on a website that has to do with a subscription
I have been asked to change the font throughout a website into Gil Sans
I've been working on a website, and currently at the stage of login/session handling.
I'm currently building a username/password/session-management/etc. system for a website I've been working on. I've
I am currently working on a website which lists the businesses as per either

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.