Skip Headers
Oracle® Database XML C++ API Reference
11g Release 1 (11.1)

B28389-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Range Interface

Table 2-24 summarizes the methods available through Range interface.

Table 2-24 Summary of Range Methods; Dom Package

Function Summary

CompareBoundaryPoints()

 

cloneContent()

 

cloneRange()

 

deleteContents()

 

detach()

Invalidate the range.

extractContent()

 

getCollapsed()

Check if the range is collapsed.

getCommonAncestorContainer()

Get the deepest common ancestor node.

getEndContainer()

Get end container node.

getEndOffset()

Get offset of the end point.

getStartContainer()

Get start container node.

getStartOffset()

Get offset of the start point.

insertNode()

 

selectNodeContent()

 

selectNode()

 

setEnd()

Set end point.

setEndAfter()

 

setEndBefore()

 

setStart()

Set start point.

setStartAfter()

 

setStartBefore()

 

surroundContents()

 

toString()

 


CompareBoundaryPoints()

Compares boundary points.

Syntax

CompareHowCode compareBoundaryPoints( 
   unsigned short how,
   Range< Node>* sourceRange)
throw (DOMException);
Parameter Description
how
how to compare
sourceRange
range of comparison

Returns

(CompareHowCode) result of comparison


cloneContent()

Makes a clone of the node, including its children.

Syntax

Node* cloneContents() throw (DOMException);

Returns

(Node*) subtree cloned


cloneRange()

Clones a range of nodes.

Syntax

Range< Node>* cloneRange();

Returns

(Range< Node>*) new cloned range


deleteContents()

Deletes contents of the node.

Syntax

void deleteContents() throw (DOMException);

detach()

Invalidates the range. It is not recommended to use this method since it leaves the object in invalid state. The preferable way is to call the destructor.

Syntax

void detach();

extractContent()

Extract the node.

Syntax

Node* extractContents() throw (DOMException);

Returns

(Node*) subtree extracted


getCollapsed()

Checks if the range is collapsed.

Syntax

boolean getCollapsed() const;

Returns

(boolean) TRUE if the range is collapsed, FALSE otherwise


getCommonAncestorContainer()

Get the deepest common ancestor of the node.

Syntax

Node* getCommonAncestorContainer() const;

Returns

(Node*) common ancestor node


getEndContainer()

Gets the container node.

Syntax

Node* getEndContainer() const;

Returns

(Node*) end container node


getEndOffset()

Get offset of the end point.

Syntax

long getEndOffset() const;

Returns

(long) offset


getStartContainer()

Get start container node.

Syntax

Node* getStartContainer() const;

Returns

(Node*) start container node


getStartOffset()

Get offset of the start point.

Syntax

long getStartOffset() const;

Returns

(long) offset


insertNode()

Inserts a node.

Syntax

void insertNode( 
   NodeRef< Node>& newNode)
throw (RangeException, DOMException);
Parameter Description
newNode
inserted node


selectNodeContent()

Selects node content by its reference.

Syntax

void selectNodeContent( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node


selectNode()

Selects a node.

Syntax

void selectNode( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node


setEnd()

Sets an end point.

Syntax

void setEnd( 
   NodeRef< Node>& refNode, 
   long offset)
throw (RangeException, DOMException);
Parameter Description
refNode
reference node
offset
offset


setEndAfter()

Sets the end pointer after a specified node.

Syntax

void setEndAfter( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node


setEndBefore()

Set the end before a specified node.

Syntax

void setEndBefore( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node


setStart()

Sets start point.

Syntax

void setStart( 
   NodeRef< Node>& refNode, 
   long offset)
throw (RangeException, DOMException);
Parameter Description
refNode
reference node
offset
offset


setStartAfter()

Sets start pointer after a specified node.

Syntax

void setStartAfter( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node


setStartBefore()

Sets start pointer before a specified node.

Syntax

void setStartBefore( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node


surroundContents()

Makes a node into a child of the specified node.

Syntax

void surroundContents( 
   NodeRef< Node>& newParent)
throw (RangeException, DOMException);
Parameter Description
newParent
parent node


toString()

Converts an item into a string.

Syntax

oratext* toString();

Returns

(oratext*) string representation of the range