Monday
Feb082010
Creating a schema and parser in 5 minutes
Monday, February 8, 2010 at 9:03AM In this short article I will demonstrate how to create a schema and a parser object for an existing xml file
in 5 minutes. Sometimes an application need share data with other applications or tools. The most common way to do this is using an xml file. This can be done in .Net using the standard tools included with the platform.
- Add the xml file to the visual studio project.
- Open the xml file and click on the XML menu item and select the Create Schema submenu.
- Save the created schema and added to the project.
- Open a Visual Studio Command Prompt.
- Change directory to the director where the recently created schema file was saved.
- Type the following command: xsd /c schemaFileName.xsd.
- This command will generate a class that supports xml serialization and deserialization.
- Add this generated file to the project and use it for serializing and desirializing the xml file.
That is it!
Hope the helps!
tagged
.Net,
schema,
xml in
.net tools
.Net,
schema,
xml in
.net tools 
Reader Comments