Skip Headers

Oracle® XML API Reference
10g Release 1 (10.1)

Part Number B10789-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

DocumentTraversal Interface

Table 8-1 summarizes the methods of available through the DocumentTraversal interface.

Table 8-1 Summary of DocumentTraversal Methods; Traversal Package

Function Summary
XmlDomCreateNodeIter
Create node iterator object.
XmlDomCreateTreeWalker
Create a tree walker object.


XmlDomCreateNodeIter

One of two methods of DocumentTraversal interface, used to create a NodeIterator object. This method is identical to XmlDomCreateTreeWalker except for the type of object returned.

The whatToShow argument is a mask of flag bits, one for each node type. The value XMLDOM_SHOW_ALL passes all node types through, otherwise only the types whose bits are set will be passed.

Entity reference expansion is controlled by the entrefExpansion flag. If TRUE, entity references are replaced with their final content; if FALSE, entity references are left as nodes.


Syntax
xmliter* XmlDomCreateNodeIter(
   xmlctx *xctx,
   xmliter *iter,
   xmlnode *root,
   xmlshowbits whatToShow, 
   XMLDOM_ACCEPT_NODE_F(
      (*nodeFilter), 
      xctx, 
      node),
   boolean entrefExpand);

Parameter In/Out Description
xctx
IN
XML context
iter
IN
existing NodeIterator to set, NULL to create
xerr
IN
root node for NodeIterator
whatToShow
IN
mask of XMLDOM_SHOW_XXX flag bits
nodeFilter
IN
node filter to be used, NULL if none
xerr
IN
whether to expand entity reference nodes


Returns

(xmliter *) original or new NodeIterator object


XmlDomCreateTreeWalker

One of two methods of DocumentTraversal interface, used to create a TreeWalker object. This method is identical to XmlDomCreateNodeIter except for the type of object returned.

The whatToShow argument is a mask of flag bits, one for each node type. The value XMLDOM_SHOW_ALL passes all node types through, otherwise only the types whose bits are set will be passed.

Entity reference expansion is controlled by the entrefExpansion flag. If TRUE, entity references are replaced with their final content; if FALSE, entity references are left as nodes.


Syntax
xmlwalk* XmlDomCreateTreeWalker(
   xmlctx *xctx, 
   xmlwalk* walker, 
   xmlnode *root,
   xmlshowbits whatToShow,
   XMLDOM_ACCEPT_NODE_F(
      (*nodeFilter),
      xctx,
      node),
   boolean entrefExpansion);

Parameter In/Out Description
xctx
IN
XML context
walker
IN
existing TreeWalker to set, NULL to create
xerr
IN
root node for TreeWalker
whatToShow
IN
mask of XMLDOM_SHOW_XXX flag bits
nodeFilter
IN
node filter to be used, NULL if none
xerr
IN
whether to expand entity reference nodes


Returns

(xmlwalk *) new TreeWalker object