# SXP Reference

compareNodes | Callbacks

#### Syntax

         compareNodes(node1,node2)

Name | Type | Description
--- | --- | ---
`node1` | `SXP_Node` | The first node to be compared.
`node2` | `SXP_Node` | The second node to be compared.
`(RET)` | `int` | The result of the comparison.

#### Description

Compares two nodes based on the document order. Returns -1 if node1 < node2 in this order, +1 if node1 > node2, and 0 if the nodes are identical. Any other value signifies an error.

#### See Also

Groups | [ Callbacks ]
Entries | [ SXP_Node ]

© 2001-2003 Ginger Alliance
revision 03-01-31
This page was generated by APIDOC