Web Studyaspnet.blogspot.com Babyneed.blogspot.com

ASP.Net Web Developer Guide

Power By: eXTReMe Tracker Powered by Blogger  
 
 
 
 

 

 
Important Links
 
   
     
 
Sitemap
 
   
   
 
Reference
 
   

Tuesday, February 14, 2006

Processing XML Files Using the System.XML Namespace(Chapter 2)

The System.Xml namespace provides all of the methods to process XML files—creating, parsing, transforming, searching, and so on. XML is a large part of ASP.NET (and ADO.NET, as discussed in the previous section), so you’ll spend quite a bit of time with it later in the book.
Supplied Functionality
XML files are essentially pure text databases. Using a system of tags (like HTML), you can declare any type of data you’d like. For example, the following code shows a simple book database:
<?xml version=1.0?>
<library>
<book>
<title>To Kill A Mockingbird</title>
<author>Harper Lee</author>
</book>
</library>
You could easily insert this data into a database such as Microsoft SQL Server, but then you’d lose the readability and portability of the data.Thus, XML is designed to make any type of data universally available.
The XmlTextReader and XmlTextWriter objects are two of the most used objects in System.Xml because they provide lightweight and easy access to the data in XML files.You can navigate through an XML file with these objects just as you would a DataSet in ADO.NET.There are also objects that represent each part of an XML file, such as an XmlNode and XmlElement.
Also of interest are the System.Xml.Schema, System.Xml.Serialization, System.Xml.XPath, and System.Xml.Xsl sub-namespaces.These groups of objects provide additional functionality that will be very useful when dealing with XML data.

0 Comments:

Post a Comment

<< Home