XML beginner

I’ve always wondered what XML really is, and today I have gotten a glimpse of it. So I was tasked to make some changes to the XML file that holds a schema to hold some extension data I need to create for the past two weeks.

The data is created at run-time, and needs to be permanently stored, so that it can be loaded and used after the application is closed. A trivial but important feature in most applications. So, how do you that?

Well it turns out you need to write some definition file in the form of a xsd file, sort of define what a XML tag is, what kind of information it is going to hold, and how the program is going to read it. So for example, I need to modify the definition file so that it can read the tag <OptimizationKey blah blah …. />.

Once this definition file, which is more or less in plain English, is written, you use a xsd executable to convert it to a source file that the project solution can understand and compile. So it’s converting your definition file to real C# source file.

The rest is just modifying the reader/writer classes to interpret the XML and write to XML accordingly. It turns out to be an easy 1hr job at the max, and 15 min for the astute programmer.

Advertisements

About dchana

all about connecting technology to everyday life and making things simple
This entry was posted in random. Bookmark the permalink.

One Response to XML beginner

  1. google says:

    I liked your article is an interesting technology
    thanks to google I found you

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 )

Google+ photo

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

Connecting to %s