Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

xml.tree

Class XM_ELEMENT_NODE


Direct ancestors

XM_NODE

Known direct descendants

XM_NAMED_NODE, XM_CHARACTER_DATA, XM_PROCESSING_INSTRUCTION, XM_COMMENT

Features

Invariants

indexing

description

Classification class for nodes that can be children of element nodes

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2003, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2003/05/13 00:42:43 $

revision

$Revision: 1.2 $

deferred class

XM_ELEMENT_NODE

inherit

XM_NODE

feature -- Access

parent: XM_COMPOSITE

-- Parent of current node;
-- Void if current node is root

-- (From XM_NODE)

feature -- Status report

is_first: BOOLEAN

-- Is this node the first in its parent's child list,
-- or the root node?

-- (From XM_NODE)

ensure
definition: Result = (is_root_node or else (parent.first = Current))
is_last: BOOLEAN

-- Is this node the last in its parent's child list,
-- or the root node?

-- (From XM_NODE)

ensure
definition: Result = (is_root_node or else (parent.last = Current))
is_root_node: BOOLEAN

-- Is current node the root node?

-- (From XM_NODE)

ensure
definition: Result = (parent = Void)
level: INTEGER

-- Depth at which current node appears relative to its root
-- (The root node has the level 1.)

-- (From XM_NODE)

ensure
root_level: is_root_node implies (Result = 1)
parent_element: XM_ELEMENT

-- Parent element.

-- (From XM_NODE)

require
not_root_node: not is_root_node
not_root_element: not parent.is_root_node
ensure
result_not_void: Result /= Void
root_node: XM_DOCUMENT

-- Root node of current node

-- (From XM_NODE)

ensure
result_not_void: Result /= Void

feature {XM_COMPOSITE} -- Element change

node_set_parent (a_parent: like parent)

-- Set parent to a_parent.

-- (From XM_NODE)

ensure
parent_set: parent = a_parent
set_parent (a_parent: like parent)

-- Set parent to a_parent.

-- (From XM_NODE)

require
a_parent_not_void: a_parent /= Void
not_root_node: not is_root_node
ensure
parent_set: parent = a_parent

feature -- Duplication

cloned_object: like Current

-- Clone of current object

-- (From KL_CLONABLE)

ensure
cloned_not_void: Result /= Void
same_type: ANY_.same_types (Result, Current)
is_equal: Result.is_equal (Current)

feature -- Processing

process (a_processor: XM_NODE_PROCESSOR)

-- Process current node with a_processor.

-- (From XM_NODE)

require
a_processor_not_void: a_processor /= Void

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end