<!‹ Beyond HTML                  ‹>
<!‹ (c) Michael Floyd            ‹>
<!‹ Web Techniques, August 1998  ‹>

<HTML>
<HEAD>
<TITLE>Listing One</TITLE>
</HEAD>

<OBJECT
    ClassID="clsid:CFC399AF-D876-11D0-9C10-00C04FC99C8E"
    ID="MSXML"
    Name="xmlDoc">
</OBJECT>

<P>Enter a filename<BR>
<INPUT Name="Filename" size=40>
<BR><BR>

<INPUT TYPE = "BUTTON"
    Name = "ParseButton"     
    VALUE = "Parse XML File"
    onClick = "Parse(Filename.value)">

<SCRIPT>
var BrowserWin;                  
var Page;                        

function Parse(xmlFilename)
{
    var xmlDocument;

    BrowserWin = window.open("", "XMLReport");
    Page = BrowserWin.document;

    Page.writeln("<HTML>");
    Page.writeln("<TITLE>XML Output</TITLE>");
    Page.writeln("<BODY>");
    Page.writeln("<PRE>");

//  Create a Document object and report the results.

//  Create a new object instance
    xmlDocument = MSXML;                       

//  Assign the URL from the value entered by the user
    xmlDocument.URL = xmlFilename;             
                                               
    Page.writeln("<H3>Statistics for ", xmlDoc.URL, "</H3><BR>");

//  Get the document¹s Root element    
    var DocumentRoot = xmlDocument.root;       

    Page.writeln("XML Version: ", xmlDocument.version);
    Page.writeln("Charcter set supported: ", xmlDocument.charset);
    Page.writeln("Document type: ", xmlDocument.doctype);

    // The following are documented but not Supported:   
    //
    // Page.writeln("File Size: ", xmlDocument.fileSize);
    // Page.writeln("Date Modified: ", xmlDocument.fileModifiedDate);
    // Page.writeln("Updated: ", xmlDocument.FileUpdatedDate);
    // Page.writeln("Mime Type: ", xmlDocument.mimeType);

    Page.writeln("</BODY>");
    Page.writeln("</HTML>");

// Reset xmlDocument for future use    
    xmlDocument = null;                         
}

</script>
</BODY>
</HTML>