Namespace DOM


Table of contents
Modules
khtml Classes
All Classes
Module khtml
Namespace DOM

DocumentTraversal contains methods that creates Iterators to traverse a node and its children in document order (depth first, pre-order traversal, which is equivalent to the order in which the start tags occur in the text representation of the document).

class DocumentTraversal // : public Document ? { public: DocumentTraversal(); DocumentTraversal(const DocumentTraversal &other);

DocumentTraversal & operator = (const DocumentTraversal &other);

~DocumentTraversal();

*

root - The node which will be iterated together with its children. The iterator is initially positioned just before this node. The whatToShow flags and the filter, if any, are not considered when setting this position.

whatToShow - This flag specifies which node types may appear in the logical view of the tree presented by the Iterator. See the description of Iterator for the set of possible values. These flags can be combined using OR.

These flags can be combined using OR .

filter - The Filter to be used with this TreeWalker, or null to indicate no filter.

entityReferenceExpansion - The value of this flag determines whether entity reference nodes are expanded.

Returns The newly created NodeIterator .

NodeIterator createNodeIterator ( const Node &root, long whatToShow, const NodeFilter &filter, bool entityReferenceExpansion );

* Create a new TreeWalker over the subtree rooted by the specified node.

root - The node which will serve as the root for the TreeWalker . The currentNode of the TreeWalker is set to this node. The whatToShow flags and the NodeFilter are not considered when setting this value; any node type will be accepted as the root. The root must not be null.

whatToShow - This flag specifies which node types may appear in the logical view of the tree presented by the Iterator. See the description of TreeWalker for the set of possible values. These flags can be combined using OR.

These flags can be combined using OR .

filter - The Filter to be used with this TreeWalker, or null to indicate no filter.

entityReferenceExpansion - The value of this flag determines whether entity reference nodes are expanded.

Returns The newly created TreeWalker .

DOMException Raises the exception NOT_SUPPORTED_ERR if the specified root node is null.

TreeWalker createTreeWalker ( const Node &root, long whatToShow, const NodeFilter &filter, bool entityReferenceExpansion ); };



methods