The XContainer stores its child nodes as a singly-linked list of XNode objects. This means that the CompareDocumentOrder method must traverse the ancestors of the two nodes being compared until it finds the common parent. Then it must traverse the list of the common parent’s child nodes to determine the order of the two nodes being compared. Therefore, using this method might affect your performance.