Module HTMLTree::TreeElement
In: lib/html/element.rb
lib/html/xpath.rb
lib/html/element.rb
lib/html/xpath.rb

Methods

Included Modules

Enumerable Enumerable

Attributes

_parent  [RW] 
_parent  [RW] 

Public Instance methods

Add one or more children to this node.

Add one or more children to this node.

add_children(*children_to_add)

Alias for add_child

add_children(*children_to_add)

Alias for add_child

Return true if my content is a collection of Elements rather than actual data.

Return true if my content is a collection of Elements rather than actual data.

Return a collection of my children. Returns an empty Array if I am a data element, just to keep other methods simple.

Return a collection of my children. Returns an empty Array if I am a data element, just to keep other methods simple.

Return my content; either my children or my data.

Return my content; either my children or my data.

Print out to $stdout (or given IO or String) a formatted dump of my structure.

Print out to $stdout (or given IO or String) a formatted dump of my structure.

Breadth-first iterator, required by Enumerable.

Breadth-first iterator, required by Enumerable.

Return true if I have any children.

Return true if I have any children.

Return my parent element.

Return my parent element.

Change my parent. Disconnects from prior parent, if any.

Change my parent. Disconnects from prior parent, if any.

Remove one or more children from this node.

Remove one or more children from this node.

remove_children(*children_to_remove)

Alias for remove_child

remove_children(*children_to_remove)

Alias for remove_child

Given the XPath path, return an Array of matching sub-elements of the REXML tree.

Given the XPath path, return an Array of matching sub-elements of the REXML tree.

Return the ultimate parent.

Return the ultimate parent.

Protected Instance methods

[Validate]