## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.5

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XercesDOMWalker Class Reference

`#include <XercesDOMWalker.hpp>`

Inheritance diagram for XercesDOMWalker:

[legend]
List of all members.

## Public Methods

- XercesDOMWalker ()
    Constructor. More...
- virtual ~XercesDOMWalker ()
- const DOMNodeType* traverse (const DOMNodeType *pos)
    Perform a document-order traversal. More...
- DOMNodeType* traverse (DOMNodeType *pos)
    Perform a document-order traversal. More...
- const DOMNodeType* traverse (const DOMNodeType *pos, const DOMNodeType *parent)
    Perform a document-order traversal stopping at the provided parent node. More...
- DOMNodeType* traverse (DOMNodeType *pos, DOMNodeType *parent)
    Perform a document-order traversal stopping at the provided parent node. More...
- void traverseSubtree (const DOMNodeType *pos)
    Perform a pre-order traversal. More...
- void traverseSubtree (DOMNodeType *pos)
    Perform a document-order traversal. More...

## Protected Methods

- virtual bool startNode (const DOMNodeType *node)=0
    Called when first walking a node. More...
- virtual bool startNode (DOMNodeType *node)
    Called when first walking a node. More...
- virtual bool endNode (const DOMNodeType *node)=0
    Called when leaving a node. More...
- virtual bool endNode (DOMNodeType *node)
    Called when leaving a node. More...

## Constructor & Destructor Documentation

XercesDOMWalker::XercesDOMWalker ( | )

| Constructor.

XercesDOMWalker::~XercesDOMWalker ( | )`[virtual]`

## Member Function Documentation

bool XercesDOMWalker::endNode ( | DOMNodeType * node )`[protected, virtual]`

  | Called when leaving a node. Parameters:
  node | The node
Returns: return false if traversal should continue, or true if it should not.

bool XercesDOMWalker::endNode ( | const DOMNodeType * node )`[protected, pure virtual]`

  | Called when leaving a node. Parameters:
  node | The node
Returns: return false if traversal should continue, or true if it should not. Reimplemented in XercesDocumentWrapper::BuildWrapperTreeWalker, and XercesDOMFormatterWalker.

bool XercesDOMWalker::startNode ( | DOMNodeType * node )`[protected, virtual]`

  | Called when first walking a node. Parameters:
  node | The node
Returns: return false if traversal should continue, or true if it should not.

bool XercesDOMWalker::startNode ( | const DOMNodeType * node )`[protected, pure virtual]`

  | Called when first walking a node. Parameters:
  node | The node
Returns: return false if traversal should continue, or true if it should not. Reimplemented in XercesDocumentWrapper::BuildWrapperTreeWalker, and XercesDOMFormatterWalker.

DOMNodeType * XercesDOMWalker::traverse ( | DOMNodeType * pos,
| DOMNodeType * parent )

  | Perform a document-order traversal stopping at the provided parent node. Derived classes and stop the traversal by returning true from startNode() or endNode(). If that happens, the function will return the next node in document order. If desired, the caller can start traversing the tree again from that point. Note that terminal nodes will always have startNode() and endNode() called before the traversal terminates. Parameters:
  pos | The node in the tree with which to start the walk
  parent | The parent of pos. Note that for multiple calls that continue the traversal, this node must remain the same.
Returns: parent if the traversal completes, or the next node if the traversal doesn't complete.

const DOMNodeType * XercesDOMWalker::traverse ( | const DOMNodeType * pos,
| const DOMNodeType * parent )

  | Perform a document-order traversal stopping at the provided parent node. Derived classes and stop the traversal by returning true from startNode() or endNode(). If that happens, the function will return the next node in document order. If desired, the caller can start traversing the tree again from that point. Note that terminal nodes will always have startNode() and endNode() called before the traversal terminates. Parameters:
  pos | The node in the tree with which to start the walk
  parent | The parent of pos. Note that for multiple calls that continue the traversal, this node must remain the same.
Returns: parent if the traversal completes, or the next node if the traversal doesn't complete.

DOMNodeType * XercesDOMWalker::traverse ( | DOMNodeType * pos )

  | Perform a document-order traversal. Derived classes and stop the traversal by returning true from startNode() or endNode(). If that happens, the function will return the next node in document order. If desired, the caller can start traversing the tree again from that point. Note that terminal nodes will always have startNode() and endNode() called before the traversal terminates. Parameters:
  pos | The node in the tree with which to start the walk
Returns: 0 if the traversal completes, or the next node if the traversal doesn't complete.

const DOMNodeType * XercesDOMWalker::traverse ( | const DOMNodeType * pos )

  | Perform a document-order traversal. Derived classes and stop the traversal by returning true from startNode() or endNode(). If that happens, the function will return the next node in document order. If desired, the caller can start traversing the tree again from that point. Note that terminal nodes will always have startNode() and endNode() called before the traversal terminates. Parameters:
  pos | The node in the tree with which to start the walk
Returns: 0 if the traversal completes, or the next node if the traversal doesn't complete.

void XercesDOMWalker::traverseSubtree ( | DOMNodeType * pos )

  | Perform a document-order traversal. Parameters:
  pos | starting node

void XercesDOMWalker::traverseSubtree ( | const DOMNodeType * pos )

  | Perform a pre-order traversal. Parameters:
  pos | starting node

The documentation for this class was generated from the following file:

- XercesDOMWalker.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.5 Copyright © 2000, 2001, 2002, 2003 The Apache Software Foundation. All Rights Reserved.