FOM Reference > Formatting > Datatypes > fXMLTreePos interface
  
fXMLTreePos interface
A position in a stream during formatting.
NodeOffset enumeration
Values which indiciate the relative position of the formatter to a node.
If the node is an fxText or fxCDATASection node, the offset represents the position within the text content of the node, otherwise it is one of the defined values.
The NodeOffset enumeration has the following constants of type int.
START_TAG = 0
This position is at the start of the node.
END_TAG = 1
This position is at the end of the node.
END_OF_DOCUMENT = 2
This position represents the end of the document and is after the root node, only for the fxDocument Node
currentXMLNode attribute
This is the fxNode object for the current node being formatted within the XML tree.
currentXMLNode
Access
read-only
Returns
fxNode
nodeOffset attribute
This is the offset for the currentXMLNode, see fXMLTreePos-NodeOffset.
nodeOffset
Access
read-only
Returns
int
setFormatPosition method
PI: attr XPath Extension: set-formatpos
This method changes the format position for this level of the format hierarchy. This position will be used as the next position for this level of the hierarchy when formatting returns to that level. Incorrect use of this method can cause infinite loops, use with caution.
setFormatPositionnodeoffset
Parameters
fxNodenode
The node to use.
intoffset
The offset relative to the node, see fXMLTreePos-NodeOffset.
Returns
void. This method does not return a value