internet.com

Go to WebDeveloper Home


hm-v6-139x61.gif

Database Journal: The Knowledge Center for Database Professionals

find a web host with:
CGI Access
DB Support
NT Servers
UNIX Servers
Telnet Access

advanced search
jobs

Get FREE Development Info via your Email!

The Webdeveloper channel
FlashKit
GIF.com
HiermenusCentral
webdeveloper Jobs
Java Boutique
JavaScript.com
JavaScript Source
ScriptSearch
StreamingMedia World
WDJ
WDVL
WebDeveloper.com
WebReference.com
XMLFiles.com

internet.com
Internet News
Internet Investing
Internet Technology
Windows Internet Tech.
Linux/Open Source
Web Developer
ECommerce/Marketing
ISP Resources
ASP Resources
Wireless Internet
Downloads
Internet Resources
Internet Lists
International
EarthWeb
Career Resources

Search internet.com
Advertise
Corporate Info
Newsletters
E-mail Offers

internet.commerce
Be a Commerce Partner










 
THE XML FILES
A WebDeveloper.com Feature

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.

[ Click here to move to the next part of the article ]

Fast Jump to Anywhere on WebDeveloper.com®:



internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs


Contact the WebDeveloper.com® staff

Last modified: Friday, 22-Aug-2008 13:46:48 EDT

 

Refresh Daily
Join Editor-in-Chief David Fiedler The Editor With No Time and find truth, justice, and a clue or two.


Browse by Category
[ Site Map ]

ActiveX / VBscript
Animated GIF Archive
Browsers
CGI / Perl
Database Connectivity
E-Commerce
HTML-Advanced: DHTML, CSS
HTML / Site Authoring Tools
Intranet/Groupware
Java
JavaScript
Multimedia: Audio / Video / Streaming Technologies
Opinions
Refresh Daily: Editorial Column
Security
Servers & Server Tools
Site Design / Graphics
Site Management / Marketing / Log File Analysis
VRML / 3D
XML