/// <summary>
 /// Compares two nodes to determine their relative XML document order.
 /// </summary>
 /// <param name="x">The first node to compare.</param>
 /// <param name="y">The second node to compare.</param>
 /// <returns>
 /// 0 if the nodes are equal;
 /// -1 if x is before y;
 /// 1 if x is after y.
 /// </returns>
 /// <exception cref="InvalidOperationException">
 /// Thrown if the two nodes do not share a common ancestor.
 /// </exception>
 public int Compare(XNode?x, XNode?y)
 {
     return(XNode.CompareDocumentOrder(x, y));
 }