• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Using the MSHTML Control

Using the MSHTML control, you can read data in HTML format into a recordset. Here’s an example, which I’ll call data.html. This document holds data in HTML format; the data we’re using here represents a set of employees. I’ve divided the data into records, one for each employee. Each record has several fields, such as Name to hold the employee’s name, ID to hold their ID number, and so on. You can create a record just by storing multiple fields, and you create a field by giving a <SPAN> element a name and then storing the data as that <SPAN> element’s text. Here’s what the data document looks like, with five employee records:

(data.html on the web site)

<HTML> 
    <HEAD> 
        <TITLE> 
            A Data Document 
        </TITLE> 
    </HEAD> 

    <BODY> 
        <H1> 
            This page holds data. 
        </H1> 
        Name: <SPAN ID="NAME">Frank</SPAN><BR> 
        ID: <SPAN ID="ID">2314</SPAN><BR> 
        Hire Date: <SPAN ID="HIRE_DATE"> 
            9-2-2003</SPAN><BR> 
        Department: <SPAN ID="DEPARTMENT"> 
            Shipping</SPAN><BR> 
        Title: <SPAN ID="TITLE">Packer</SPAN><BR> 

        Name: <SPAN ID="NAME">Martin</SPAN><BR> 
        ID: <SPAN ID="ID">2315</SPAN><BR> 
        Hire Date: <SPAN ID="HIRE_DATE"> 
            9-2-2003</SPAN><BR> 
        Department: <SPAN ID="DEPARTMENT"> 
            Packing</SPAN><BR> 
        Title: <SPAN ID="TITLE">Programmer</SPAN><BR> 

        Name: <SPAN ID="NAME">Tom</SPAN><BR> 
        ID: <SPAN ID="ID">2316</SPAN><BR> 
        Hire Date: <SPAN ID="HIRE_DATE"> 
            9-2-2003</SPAN><BR> 
        Department: <SPAN ID="DEPARTMENT"> 
            Shipping</SPAN><BR> 
        Title: <SPAN ID="TITLE">Packer</SPAN><BR> 

        Name: <SPAN ID="NAME">Henry</SPAN><BR>  
        ID: <SPAN ID="ID">2317</SPAN><BR> 
        Hire Date: <SPAN ID="HIRE_DATE"> 
            9-2-2003</SPAN><BR> 
        Department: <SPAN ID="DEPARTMENT"> 
            Shipping</SPAN><BR> 
        Title: <SPAN ID="TITLE">Packer</SPAN><BR> 

        Name: <SPAN ID="NAME">Paula</SPAN><BR> 
        ID: <SPAN ID="ID">2318</SPAN><BR> 
        Hire Date: <SPAN ID="HIRE_DATE"> 
            9-2-2003</SPAN><BR> 
        Department: <SPAN ID="DEPARTMENT"> 
            Shipping</SPAN><BR> 
        Title: <SPAN ID="TITLE">Packer</SPAN><BR> 
    </BODY> 
</HTML> 

					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint