Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











PROPERTY:  DocumentType::name

DocumentType.name

The name property contains the name of the document type; i.e., the name that immediately follows the 'DOCTYPE' keyword.

In the example we use the 'staff.xml' file which has the following DOCTYPE declaration:

<!DOCTYPE staff SYSTEM "staff.dtd">

The code then returns the name property of the DocumentType.

Code (JavaScript):
xml_doc = new ActiveXObject("Microsoft.XMLDOM");
xml_doc.async = false;
xml_doc.load("staff.xml");

d_type = xml_doc.doctype;
document.write(d_type.name);

Output:
staff



 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information