View comments | RSS feed

XMLNode


Object
    |
    +-XMLNode

public class XMLNode
extends Object

An XML document is represented in Flash by the XML class. Each element of the hierarchical document is represented by an XMLNode object.

Availability: ActionScript 1.0; Flash Player 5

See also

XML

Property summary

Modifiers

Property

Description

 

attributes:Object

An object containing all of the attributes of the specified XML instance.

 

childNodes:Array [read-only]

An array of the specified XML object's children.

 

firstChild:XMLNode [read-only]

Evaluates the specified XML object and references the first child in the parent node's child list.

 

lastChild:XMLNode [read-only]

An XMLNode value that references the last child in the node's child list.

 

localName:String [read-only]

The local name portion of the XML node's name.

 

namespaceURI:String [read-only]

If the XML node has a prefix, namespaceURI is the value of the xmlns declaration for that prefix (the URI), which is typically called the namespace URI.

 

nextSibling:XMLNode [read-only]

An XMLNode value that references the next sibling in the parent node's child list.

 

nodeName:String

A string representing the node name of the XML object.

 

nodeType:Number [read-only]

A nodeType value, either 1 for an XML element or 3 for a text node.

 

nodeValue:String

The node value of the XML object.

 

parentNode:XMLNode [read-only]

An XMLNode value that references the parent node of the specified XML object, or returns null if the node has no parent.

 

prefix:String [read-only]

The prefix portion of the XML node name.

 

previousSibling:XMLNode [read-only]

An XMLNode value that references the previous sibling in the parent node's child list.

Properties inherited from class Object

constructor, __proto__, prototype, __resolve


Constructor summary

Signature

Description

XMLNode(type:Number, value:String)

The XMLNode constructor lets you instantiate an XML node based on a string specifying its contents and on a number representing its node type.

Method summary

Modifiers

Signature

Description

 

appendChild(newChild:XMLNode) : Void

Appends the specified node to the XML object's child list.

 

cloneNode(deep:Boolean) : XMLNode

Constructs and returns a new XML node of the same type, name, value, and attributes as the specified XML object.

 

getNamespaceForPrefix(prefix:String) : String

Returns the namespace URI that is associated with the specified prefix for the node.

 

getPrefixForNamespace(nsURI:String) : String

Returns the prefix that is associated with the specified namespace URI for the node.

 

hasChildNodes() : Boolean

Specifies whether or not the XML object has child nodes.

 

insertBefore(newChild:XMLNode, insertPoint:XMLNode) : Void

Inserts a newChild node into the XML object's child list, before the insertPoint node.

 

removeNode() : Void

Removes the specified XML object from its parent.

 

toString() : String

Evaluates the specified XML object, constructs a textual representation of the XML structure, including the node, children, and attributes, and returns the result as a string.

Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch



Version 8

Comments


davidcolquhoun said on Apr 14, 2007 at 3:57 PM :
So what are the numbers for the different types of nodes?

XMLNode(type:Number, value:String)

type number? hello?

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/8/main/00002883.html