Wednesday, November 30, 2022
Code Search
Code Bank
.NET Applications
XSD Schema Generator
.NET/XML Training


From XML to Database using the XmlTextReader

The .NET platform offers several different avenues for moving XML data into a database. For example, XML can be mapped to database tables and fields using the DataTableMapping and DataColumnMapping classes in conjunction with a DataAdapter, or the XML can be transformed to fit the database schema using XSLT.

While both of these solutions work well, there may be cases where you want complete control over the SQL statements that are generated as well as optimal efficiency so that parsing large XML documents does not represent a problem to your application.

This example examines how the XmlTextReader can be used to parse a complex XML document hierarchy to dynamically generate SQL statements that can be executed against a database. Because the XmlTextReader is a stream, it allows very large XML documents to be parsed quickly and efficiently.

Teaches ASP.NET, C#, XML, XmlTextReader
Requirements .NET 1.0
XML Document: Click Here
Example: Click Here
View Source Code: Click Here
Download Code: Click Here


.NET, SharePoint and Silverlight Training Solutions
    Online, Onsite and Video Training on .NET and SharePoint technologies available through The Wahlin Group.

© 2007 Wahlin Consulting LLC
XML for ASP.NET Developers in bookstores