ASp.net c# sql

February 17, 2011

Generate Structured Class from xml file

Filed under: asp.net c#, Asp.net, c#, mssql, XML, xml — Tags: , , , , , — Admin @ 1:36 pm

Tired of writing .cs class?

we can generate it see example below…

I created a test.xml file

<test>

<field1>hi</field1>

<field2>bye</field2>

</test>

Step1:

Run visual studio command promt

step2: move to the folder where test.xml is saved and execute below command

xsd test.xml

Above command will generate xsd file based on test.xml

and then execute below command to generate the .cs file

xsd /c test.xsd

Done.

You can easily generate .cs file from xml file.

 

 

Now

 

Advertisement

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: WordPress Classic. Blog at WordPress.com. Fonts on this blog.

Follow

Get every new post delivered to your Inbox.