• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

C#, XML and XML Schema

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)?
1 Solution
Craig WagnerSoftware ArchitectCommented:
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now