WebDeveloper.com �: Where Web Developers and Designers Learn How to Build Web Sites, Program in Java and JavaScript, and More!   
Web Developer Resource Directory WebDev Jobs
Animated GIFs
CSS
CSS Properties
Database
Design
Flash
HTML
HTML 4.01 Tags
JavaScript
.NET
PHP
Reference
Security
Site Management
Video
XML/RSS
WD Forums
 Client-Side
  Development

    HTML
    XML
    CSS
    Graphics
    JavaScript
    ASP
    Multimedia
    Web Video
    Accessibility
    Dreamweaver
    General
    Accessibility
    Dreamweaver
    Expression Web

    General

 Server-Side
  Development

    PHP
    Perl
    .NET
    Forum, Blog, Wiki & CMS
    SQL
    Java
    Others

 Site Management
    Domain Names
    Search Engines
    Website Reviews

 Web Development
  Business Issues

    Business Matters

 Etc.
    The Coffee Lounge
    Computer Issues
    Feedback




Understanding the DOM Part 2

by Nate Zelnick Nodes for Nerds By "node" the DOM means a place in a tree that has some structural meaning. Since XML is hierarchical, the relationships between nodes can be expressed as a set of relationships between these nodes. The actual required structure is pretty fluid, though. While a document can only have one DOCUMENT interface because this is the top-level object on the hierarchical tree, everything else is fairly ad hoc.Some node object types are really interfaces that can create one or more node object types that are contained within them. For instance, a Document is composed of exactly one Element and can also contain a ProcessingInstruction, a Comment or a DocumentType. Thus the Document interface must be able to create nodes for these types. A ProcessingInstruction is what’s called a leaf node, meaning it contains no other nodes and thus doesn’t create any other node objects.A node that contains a node is in a parent-child relationship, with the containing node designated as the parent. Thus the Document element, as the top of the hierarchy, is the parent of the nodes directly under it, while those nodes are the parents of the nodes one level below them. Nodes on the same level—that is nodes that are both children of the same parent node—are called siblings. The node objects that a Document interface can create—Elements, ProcessingInstructions, Comments or DocumentTypes—are its children. If an Element contains another Element node object created through the Element interface, it is a child node of the Element that is a child of the Document.


HTML5 Development Center


Recent Articles