XMLParserItf Interface CATIDOMTreeWalker

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIDOMTreeWalker

Interface used to navigate a document tree or subtree using the view of the document defined by their GetWhatToShow flags and filter (if any).
Any function which performs navigation using a will automatically support any view defined by a .

Omitting nodes from the logical view of a subtree can result in a structure that is substantially different from the same subtree in the complete, unfiltered document. Nodes that are siblings in the view may be children of different, widely separated nodes in the original view. For instance, consider a that skips all nodes except for Text nodes and the root node of a document. In the logical view that results, all text nodes will be siblings and appear as direct children of the root node, no matter how deeply nested the structure of the original document.

See also the Document Object Model (DOM) Level 2 Traversal and Range Specification.


Method Index


o FirstChild(CATIDOMNode_var&)
Moves the CATIDOMTreeWalker to the first visible child of the current node, and returns the new node.
o GetCurrentNode(CATIDOMNode_var&)
Retrieves the node at which the CATIDOMTreeWalker is currently positioned.
o GetExpandEntityReferences(CATBoolean&)
Retrieves the flag which determines whether the children of entity reference nodes are visible to the CATIDOMTreeWalker.
o GetFilter(CATIDOMNodeFilter_var&)
Retrieves the filter used to screen nodes.
o GetRoot(CATIDOMNode_var&)
Retrieves the root node of the CATIDOMTreeWalker, as specified when it was created.
o GetWhatToShow(unsigned int&)
Retrieves the attribute which determines which node types are presented via the CATIDOMTreeWalker.
o LastChild(CATIDOMNode_var&)
Moves the CATIDOMTreeWalker to the last visible child of the current node, and returns the new node.
o NextNode(CATIDOMNode_var&)
Moves the CATIDOMTreeWalker to the next visible node in document order relative to the current node, and returns the new node.
o NextSibling(CATIDOMNode_var&)
Moves the CATIDOMTreeWalker to the next sibling of the current node, and returns the new node.
o ParentNode(CATIDOMNode_var&)
Moves to and returns the closest visible ancestor node of the current node.
o PreviousNode(CATIDOMNode_var&)
Moves the CATIDOMTreeWalker to the previous visible node in document order relative to the current node, and returns the new node.
o PreviousSibling(CATIDOMNode_var&)
Moves the CATIDOMTreeWalker to the previous sibling of the current node, and returns the new node.
o SetCurrentNode(CATIDOMNode_var&)
Sets the node at which the CATIDOMTreeWalker is to be currently positioned.

Methods


o FirstChild
public virtual FirstChild( oFirstChild)
Moves the CATIDOMTreeWalker to the first visible child of the current node, and returns the new node. If the current node has no visible children, returns NULL_var, and retains the current node.
Parameters:
oFirstChild
The new node, or NULL_var if the current node has no visible children in the
's logical view.
o GetCurrentNode
public virtual GetCurrentNode( oCurrentNode)
Retrieves the node at which the CATIDOMTreeWalker is currently positioned.
Alterations to the DOM tree may cause the current node to no longer be accepted by the 's associated filter. may also be explicitly set to any node, whether or not it is within the subtree specified by the node or would be accepted by the filter and flags. Further traversal occurs relative to even if it is not part of the current view, by applying the filters in the requested direction; if no traversal is possible, is not changed.
Parameters:
oCurrentNode
the node at which the
is currently positioned.
o GetExpandEntityReferences
public virtual GetExpandEntityReferences( oResult)
Retrieves the flag which determines whether the children of entity reference nodes are visible to the CATIDOMTreeWalker. If false, they and their descendants will be rejected. Note that this rejection takes precedence over and the filter, if any.
To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the flags to hide the entity reference node and set to true when creating the . To produce a view of the document that has entity reference nodes but no entity expansion, use the flags to show the entity reference node and set to false.
Parameters:
oResult
the flag which determines whether the children of entity reference nodes are visible to the
.
o GetFilter
public virtual GetFilter( oFilter)
Retrieves the filter used to screen nodes.
Parameters:
oNodeFilter
the filter used to screen nodes
o GetRoot
public virtual GetRoot( oRoot)
Retrieves the root node of the CATIDOMTreeWalker, as specified when it was created.
Parameters:
oRoot
The root node of the
o GetWhatToShow
public virtual GetWhatToShow( oType)
Retrieves the attribute which determines which node types are presented via the CATIDOMTreeWalker. The available set of constants is defined in the interface. Nodes not accepted by will be skipped, but their children may still be considered. Note that this skip takes precedence over the filter, if any.
Parameters:
oType
the attribute which determines which node types are presented via the
o LastChild
public virtual LastChild( oLastChild)
Moves the CATIDOMTreeWalker to the last visible child of the current node, and returns the new node. If the current node has no visible children, returns NULL_var, and retains the current node.
Parameters:
oLastChild
The new node, or NULL_var if the current node has no children in the
's logical view.
o NextNode
public virtual NextNode( oNextNode)
Moves the CATIDOMTreeWalker to the next visible node in document order relative to the current node, and returns the new node. If the current node has no next node, or if the search for nextNode attempts to step upward from the 's node, returns NULL_var, and retains the current node.
Parameters:
oNextNode
The new node, or NULL_var if the current node has no next node in the
's logical view.
o NextSibling
public virtual NextSibling( oNextSibling)
Moves the CATIDOMTreeWalker to the next sibling of the current node, and returns the new node. If the current node has no visible next sibling, returns NULL_var, and retains the current node.
Parameters:
oNextSibling
The new node, or NULL_var if the current node has no next sibling. in the
's logical view.
o ParentNode
public virtual ParentNode( oParentNode)
Moves to and returns the closest visible ancestor node of the current node. If the search for attempts to step upward from the 's node, or if it fails to find a visible ancestor node, this method retains the current position and returns NULL_var.
Parameters:
oParentNode
The new parent node, or NULL_var if the current node has no parent in the
's logical view.
o PreviousNode
public virtual PreviousNode( oPreviousNode)
Moves the CATIDOMTreeWalker to the previous visible node in document order relative to the current node, and returns the new node. If the current node has no previous node, or if the search for previousNode attempts to step upward from the 's node, returns NULL_var, and retains the current node.
Parameters:
oPreviousNode
The new node, or NULL_var if the current node has no previous node in the
's logical view.
o PreviousSibling
public virtual PreviousSibling( oPreviousSibling)
Moves the CATIDOMTreeWalker to the previous sibling of the current node, and returns the new node. If the current node has no visible previous sibling, returns NULL_var, and retains the current node.
Parameters:
oPreviousSibling
The new node, or NULL_var if the current node has no previous sibling. in the
's logical view.
o SetCurrentNode
public virtual SetCurrentNode( const iCurrentNode)
Sets the node at which the CATIDOMTreeWalker is to be currently positioned.
Parameters:
iCurrentNode
the node at which the
is to be currently positioned.
Errors Returned:
Error Class Error Id Description
XMLParserERR_2205 NOT_SUPPORTED_ERR: Raised if an attempt is made to call with a NULL_var argument.

This object is included in the file: CATIDOMTreeWalker.h
If needed, your Imakefile.mk should include the module: CatXmlItfExt

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.