(Article) XML and C#
Article : XML and C#
Introduction
XML, or Extensible Markup Language, is a very popular format used to store and share data. In a nutshell, XML stores information in a tree-based text format that allows both you and I as well as computers to easily read the data. I'm sure you have used XML-like languages directly or indirectly, to borrow two popular examples, if you have ever used RSS feeds or have written XHTML pages.
In this tutorial, I will explain how to read data from an XML file in C#. The .NET Framework provides built-in functionality for reading and writing XML, but knowing how to use those classes can be important. Before diving into the code, I want to provide a brief overview of XML and cover some terminology because it will help you to better understand why the code does something of the things it does.
Here is how a simple XML file looks like:
Code: XML
<?xml version"1.0"?> <forums> <forum name="Web Development"> <thread> <title>ASP/ASP.NET</title> <link>http://www.go4expert.com/forums/forumdisplay.php?f=67</link> </thread> <thread> <title>PHP</title> <link>http://www.go4expert.com/forums/forumdisplay.php?f=66</link> </thread> <thread> <title>PERL-CGI</title> <link>http://www.go4expert.com/forums/forumdisplay.php?f=69</link> </thread> </forum> </forums>
Courtesy:- Go4expert.com
- guru's blog
- Login or register to post comments

