XML
  Home arrow XML arrow Page 2 - XML Integration with ADO
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

XML Integration with ADO
By: Gayathri Gokul
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 12
    2004-04-05

    Table of Contents:
  • XML Integration with ADO
  • XML Data Simplified
  • Easy as 1,2,3
  • Saving Recordsets as XML

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    XML Integration with ADO - XML Data Simplified


    (Page 2 of 4 )

    The following diagram contains different levels of data. First we have the Publishers, then for each publisher a list of employees and a list of sales. Subsequently for each sale, there is a list of books that were sold.

    XML ADO

    The above diagram is self explanatory.  Let’s imagine that we have a hierarchical database in XML, say we want to enable it all to be viewed at once in the browser. What we are trying to achieve here is a top-level table containing just the Publishers. For each publisher, there should be two sub-tables. One is holding the values for the employee and other sales. For each sale, we try to maintain another table containing the details of the books sold. Let us assume each of these tables have been populated with some data.

    From the above diagram it should be clear that, the only way we can bind to these relatively simple multi layers is to layer our binding. For the above XML, we would do the following to give nested tables. Let’s examine Example 2:


    <TABLE ID “tbPublishers” DATASRC=  #diPublishers” BORDER= “1”>
      <TBODY>
         <TR>
                   <TD><DIV DATAFLD= “pub_name”</DIV></TD>
                   <TD><DIV DATAFLD= “city”</DIV></TD>
                  <TD><DIV DATAFLD= “state”</DIV></TD>
             </TR>
             <TR>
          <TD COLSPAN=4>
           <TABLE >
              <TR>
                  <TD>Titles</TD>
                </TR>
                <TR>
                  <TD COLSPAN=4>
                   <TABLE  DATASRC= “#diPublishers” DATAFLD = “Title” Border= “1”>
                    <TR>
                          <TD><DIV DATAFLD= “title”</DIV></TD>
                            <TD><DIV DATAFLD= “price”</DIV></TD>
                     </TR>
                <TR>
                  <TD COLSPAN=3>
                      <TABLE  DATASRC= “#diPublishers” DATAFLD = “sale” Border= “1”>
                    <TR>
                          <TD><DIV DATAFLD= “ord_date”</DIV></TD>
                            <TD><DIV DATAFLD= “qty”</DIV></TD>
                         </TR>
                     </TABLE>
                   </TD>
                </TR>
            </TABLE>
            </TD>
       </TR>
       <TR>
          <TD>Employee</TD>
       </TR>
       <TR>
           <TD COLSPAN =4>
         <TABLE  DATASRC= “#diPublishers” DATAFLD = “Employee” Border= “1”>
                   <TR>
                       <TD><DIV DATAFLD= “fname”</DIV></TD>
                        <TD><DIV DATAFLD= “lname”</DIV></TD>
                         </TR>
                     </TABLE>


    More XML Articles
    More By Gayathri Gokul


     

    XML ARTICLES

    - More on Triggers and Styles and Control Temp...
    - Looking at Triggers with Styles and Control ...
    - A Closer Look at Styles and Control Templates
    - Styles and Control Templates
    - Properties and More in XAML
    - Elements and Attributes in XAML
    - XAML in a Nutshell
    - Importing XML Files into Access 2007
    - Using MSXML3.0 with VB 6.0
    - MSXML, concluded
    - MSXML, continued
    - MSXML Tutorial
    - Generating XML Schema Dynamically Using VB.N...
    - XSL Transformations using ASP.NET
    - Applying XSLT to XML Using ASP.NET





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway