spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column102


Web Services, Part VII: XML Object's Nodes and Types

Sr Instructional Designer D2L-Moodle,Clearance
WSI Nationwide, Inc.
US-NJ-Fort Monmouth

Justtechjobs.com Post A Job | Post A Resume
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs


Setting the Node Name

There are twelve node types in the DOMDocument tree. The nodeName property of these nodes depends on the node type. In some node types, the nodeName property reflects a user-given name. For example, the nodeName property of the attribute node is the name of the property, as assigned by the author. In other node types, the nodeName property contains a fixed string. For example, the nodeName property of the text node contains the string "#text". The following table lists the nodeName property of all node types:

ValuenodeTypeStringnodeName
1"element"Contains the name of the XML tag, with any namespace prefix included if present.
2"attribute"Contains the name of the attribute.
3"text"Contains the literal string "#text".
4"cdatasection"Contains the literal string "#cdata-section".
5"entityreference"Contains the name of the entity referenced. Note that the name does not include the leading ampersand or the trailing semicolon. The name includes the namespace if one is present.
6"entity"Contains the name of the entity.
7"processinginstruction"Contains the target; the first token following the <? characters.
8"comment"Contains the literal string "#comment".
9"document"Contains the literal string "#document".
10"documenttype"Contains the name of the document type; for example, xxx in <!DOCTYPE xxx ...>.
11"documentfragment"Contains the literal string "#document-fragment".
12"notation"Contains the name of the notation.

Next: How to create a new node

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: January 28, 2002
Revised: January 28, 2002

URL: http://www.webreference.com/js/column102/3.html