elogger API
Overview Classes Cluster Class Index          Top Features

xml.tree

Class XM_PROCESSING_INSTRUCTION


Direct ancestors

XM_DOCUMENT_NODE, XM_ELEMENT_NODE

Creation

Features

Invariants

indexing

description

XML processing instruction nodes

library

Gobo Eiffel XML Library

copyright

Copyright (c) 2001, Andreas Leitner and others

license

Eiffel Forum License v2 (see forum.txt)

class XM_PROCESSING_INSTRUCTION

inherit

XM_DOCUMENT_NODE
XM_NODE
XM_ELEMENT_NODE
XM_NODE

create

make (a_parent: like parent; a_target: like target; a_data: like data)

-- Create a new processing instruction node.

require

a_target_not_void: a_target /= Void
a_data_not_void: a_data /= Void

ensure

parent_set: parent = a_parent
target_set: target = a_target
data_set: data = a_data

make_last (a_parent: XM_ELEMENT; a_target: like target; a_data: like data)

-- Create a new processing instruction node,
-- and add it to parent.

require

a_target_not_void: a_target /= Void
a_data_not_void: a_data /= Void

ensure

parent_set: parent = a_parent
in_parent: parent.last = Current
target_set: target = a_target
data_set: data = a_data

make_last_in_document (a_parent: XM_DOCUMENT; a_target: like target; a_data: like data)

-- Create a new processing instruction node.
-- and add it to parent.

require

a_target_not_void: a_target /= Void
a_data_not_void: a_data /= Void

ensure

parent_set: parent = a_parent
in_parent: parent.last = Current
target_set: target = a_target
data_set: data = a_data

feature -- Access

parent: XM_COMPOSITE

-- Parent of current node;
-- Void if current node is root
-- (From XM_NODE)

data: STRING

-- Content of current processing instruction;
-- This is from the first non white space character after
-- the target to the character immediately preceding the ?>.

target: STRING

-- Target of current processing instruction;
-- XML defines this as being the first token following
-- the markup that begins the processing instruction.

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 -- Element change

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 {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

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

feature -- Setting

set_data (a_data: STRING)

-- Set data.

require

a_data_not_void: a_data /= Void

ensure

set: data = a_data

set_target (a_target: STRING)

-- Set target.

require

a_target_not_void: a_target /= Void

ensure

set: target = a_target

invariant

target_not_void: target /= Void
data_not_void: data /= Void

-- From XM_DOCUMENT_NODE

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

-- From XM_ELEMENT_NODE

Documentation generated by edoc