advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Download the code for this article
The XmlDataSource control in ASP.NET 2.0 takes web development to the next step by providing a seamless way to consume XML based data in an ASP.NET page without having to write a single line of code. Do you think that encapsulating will simply increase the confusion that many developers already have about the ever-increasing flavors of XML, XSLT, XPath and data-binding? Do you plan to use the new control much? Let us know in the ASP.NET discussion forum on DevX.
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

XML Data-Binding Powers Up in ASP.NET 2.0

In ASP.NET 2.0, the new XmlDataSource control greatly simplifies binding XML sources to controls, letting you display hierarchical XML data easily. It even leverages XSLT, XPath, and caching, eliminating much manual coding.  


advertisement
ML data is generally used to represent semi-structured or hierarchal data. Using XML documents as your data source allows you to receive XML documents from other sources and format the XML data to be compatible with your application. ASP.NET 1.0 let you use XML data sources, but much of that work required manual coding to get the data into a format suitable for display. In contrast, ASP.NET 2.0 provides a new XmlDataSource control that simplifies binding XML data to controls such as the TreeView and GridView—and it works with both hierarchical and tabular data.


Loading the XmlDataSource Control
Typically, you'd use the XmlDataSource control to display hierarchical XML data in read-only scenarios. However, because the control implements the IDataSource interface, it also works with tabular, or list-style, data. You can load the XmlDataSource control from either an XML file, by setting the DataFile property, or from a string containing XML, by setting the control's Data property to the string.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement