Skip to Content
ActionScript: The Definitive Guide
book

ActionScript: The Definitive Guide

by Colin Moock
May 2001
Intermediate to advanced
720 pages
23h 24m
English
O'Reilly Media, Inc.
Content preview from ActionScript: The Definitive Guide

Name

XML.nodeType Property — the type of the current node

Availability

Flash 5

Synopsis

theNode.nodeType

Access

Read-only

Description

The nodeType is an integer property that returns theNode’s type. Since only two node types are supported by ActionScript—element nodes and text nodes—nodeName has only two possible values: 1, if the node is an element node; and 3, if the node is a text node. These values may seem arbitrary, but they are actually the appropriate values as stipulated by the DOM. For reference, the other node types in the DOM are listed in Table 20.13.

Table 20-13. DOM Node Types

Node Description

Node Type Code

ELEMENT_NODE*

1

ATTRIBUTE_NODE

2

TEXT_NODE*

3

CDATA_SECTION_NODE

4

ENTITY_REFERENCE_NODE

5

ENTITY_NODE

6

PROCESSING_INSTRUCTION_NODE

7

COMMENT_NODE

8

DOCUMENT_NODE

9

DOCUMENT_TYPE_NODE

10

DOCUMENT_FRAGMENT_NODE

11

NOTATION_NODE

12

*Supported by Flash. Technically, ActionScript implements so-called attribute, document, and document_type nodes in addition to element and text nodes, but we don’t have direct access to them as objects. For example, we may manipulate the attributes of a node through the attributes property, but we do not have direct access to attribute nodes themselves. Similarly, we have access to the DOCTYPE tag of a document through the docTypeDecl property, but we do not have direct access to document_type itself.

Element nodes correspond to XML or HTML tags. For example, in the XML fragment <P>what is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Actionscript Cookbook

Actionscript Cookbook

Joey Lott
ActionScript 3.0 Design Patterns

ActionScript 3.0 Design Patterns

William Sanders, Chandima Cumaranatunge

Publisher Resources

ISBN: 1565928520Catalog PageErrata