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 5850025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T13:04:59+00:00 2026-05-22T13:04:59+00:00

I created an XSD file from Visual Studio and can generate a sample XML

  • 0

I created an XSD file from Visual Studio and can generate a sample XML as well, but my goal is to use this XSD to create an XML file at runtime.

I used XSD.exe to generate a class from my XSD file and then created a program to populate the object from the “class”. How can I serialize the object to an XML file?

  • 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-05-22T13:05:00+00:00Added an answer on May 22, 2026 at 1:05 pm

    When you have created classes to serialize and deserialize the Xml file using the XSD.exe tool you can write your instances back to files using ..

    Serialization! (Archive)

      Stream stream = File.Open(filename, FileMode.Create);
      XmlFormatter formatter = new XmlFormatter (typeof(XmlObjectToSerialize));
      formatter.Serialize(stream, xmlObjectToSerialize);
      stream.Flush();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I have needed to create a class file from an XML XSD schema,
I'm using XmlSerializer with classes created from a xsd using xsd.exe . It has
I am attempting to build some classes so that I can deserialise an XML
I have some common types which are defined in an xsd file which is
I want to create a php webservice server to be used from a C#
After reading the following article Create Test Conditions for the Database Unit Test Designer
High bounty for the following Q: Hello, Here is what I tried on Ubuntu
I recently posted a question about a WCF Restful web service that I am
I followed the instructions at Unit Testing with Junit, Spring and Hibernate – Part
What I'm trying to do is add a NoneOfTheBelow choice to all enums parsed

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.