C#, XML and XML Schema

Posted on 2009-12-16
Last Modified: 2013-12-17
What I am looking to find out is can I use a XML Schema as a template to create an XML document? Is there a way to take the basic XML Schema and customize it each time to get a different XML document? I am working in C# and I have a way to read it pragmatically, is there a way to do what I am wanting through C#? Make a base XML Schema then use functionality like inheritance in C# to create a new schema?  
What I need to do is this, I need to create a new XML document and load it with administrator passwords. These normally do not get changed except for every three months. There are situations where someone at the I.T. level leaves the firm for whatever reason that I have to create a new administrator password.
That being said, is there a way to use an XML Schema to use as a template for a new XML document without having to re-create the XML document through code each time (node by node)?
Question by:Mister_Spock
    1 Comment
    LVL 21

    Accepted Solution

    I've got a class I wrote several years ago that will produce an XML document given an XmlSchema. Take a look at the various GetXmlString overloads in the attached class, they're the entry points to that functionality.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    733 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now