Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

Sunday, March 27, 2011

Validate XML aganist an XSD in Asp.Net C#

Most of the times when we are working with XML we need to validate the XML file from an XSD file. Here i am showing an code example how one can validate XML file using an XSD in Asp.Net C#.

To do that add an aspx page in your project.











Now under Page_Load event write the below code:
using System;
using System.Xml;
using System.Text;
using System.Xml.Schema;

public partial class

Creating XSD file from an XML file in Asp.Net within few seconds

There are a lot of tools in the internet you will get to create XSD file from an XML file but you need to download then install or may be convert on-line. But there is good news that Asp.Net has built in menu to create XSD file from an XML file.












To do that first write the below XML file in VisualStudio:


Friday, November 26, 2010

How to bind XML File or XML DataSource to a DataList Control in Asp.Net

DataList control is an important control in Asp.Net applications. Most of the times we need to bind DataList control from a Database using Ado.Net datasource. But sometimes we need to bind XML file as Datasource into a DataList control. Here in this article i will demonstrate how one can bind XML data into a DataList control using the datasource XmlDataSource. The output will be:


To do the

Wednesday, July 28, 2010

How to bind or populate Dropdownlist from XML file

Few days ago i got an email from one of my reader. He wants more article on XML specially on Dropdownlist. Here in this article i will explain how one can bind or populate XML data into a Dropdownlist control. Asp.net DataSet provide us a method named ReadXml where we can initially load XML file. After that we can populate Dropdownlist DataTextField & DataValueField by DataSet default view table.

Saturday, April 17, 2010

How to bind XML file in a TreeView control using Asp.net C#

By using Asp.net TreeView control we can give enhanced UI experience to the user. We can specially use TreeView control to display hierarchical data like MLM tree, Sitemap. We can bind data into the TreeView control from database self referencial table as well as from a XML file. Here in this article or tutorial i am going to explain how one can bind XML data into a TreeView control as well as we

Tuesday, January 12, 2010

Read or consume RSS Feed in Asp.net 2.0/3.5

In my first article i have explained "How you can create RSS feed using Asp.net". Here in this article i will explain how one can read or consume RSS Feed from Asp.net website. If you look at google reader then you will get a basic idea how one can Reading or Consuming RSS Feed from a RSS Feed link. I don't want to teach you the necessity of reading RSS in this article. So i want to start

Tuesday, January 5, 2010

Creating RSS feed using Asp.Net 2.0 / 3.5

RSS means Really Simple Syndication which is a Web content syndication format.

If you are looking for "Read/Consume RSS feed" article then click here.

Now let’s try to find out what RSS is about. Basically the website owner should return a RSS feed - and that's simply an XML document following a certain standard, describing new or latest articles on your site. When one copy your feeds & read it

Friday, June 5, 2009

DataView DataTable Creating, Adding, Modifying, Deleting, Sorting & Filtering

In this tutorial i will discuss how we can manage DataTable object on the fly using Asp.net C#. There were a lot of scnario where we need to dynamically create a DataTable, modify, sorting & paging. Asp.net gives us the bulit in System.Data namespace to programatically manage tabular data in runtime. Note that the DataTable can be bound to any data Web control just like a DataSet or DataReader as

Creating XML document runtime in Asp.net C#

Due to the popularity of XML file most of the times we need to create XML file in runtime. In this post i will show you a simple example how we can create XML file programatically. By using this example you can also make XML file dynamically from SQL Server Database table by iterating across the rows. To make the XML on the fly first add System.Xml namespace in your project. Then create a

Tuesday, May 26, 2009

How to bind a XML file to a GridView using Asp.net C#

Recently one of the most popular data source is XML. For simplicity developer wants to make an XML file since its easy to use in the Asp.net built in data controls like GridView. In this post i will try to show you how one can bind easily XML file as a data source of GridView control. In the later section i will discuss how to bind XML file to a GridView control in run time.Focus Area:1. Bind XML